Custom Language Files

You can modify existing translation files or add new language files. But don’t put your files in the plugin directory wp-filebase-pro/languages, otherwise they will be deleted on next plugin update!

This is how you make your translation files surviving updates:

Add this line to your wp-config.php:

define('WPFB_LANG_DIR', 'wp-content/wpfb-lang');

right above

/* That's all, stop editing! Happy blogging. */

Then create the directory wp-content/wpfb-lang and put the .mo files in there. Mind the name pattern:

You can use template.po as a template for translation. Poedit is a nice gettext editor.

VN:F [1.9.22_1171]
Rating: 2.0/5 (1 vote cast)
Custom Language Files, 2.0 out of 5 based on 1 rating

3 thoughts on “Custom Language Files

  1. VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    Hi there, Our web site is in four languages, English, Spanish, Portuguese and German ( I use WP-filebase,and I love it, but I can’t work out how to enable the various .mo files to display the file browser in the selected language (eg. Could you please give me a quick pointer on enabling the various languages?

    Many thanks, Kevin

    1. Fabian says:
      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)

      Hi Kevin, something like in your file template should work:
      < ?php _e($f->get_tpl_var('file_display_name'),'your-text-domain'); ?>
      You need to load your tr .mo files manually in your theme function.php for example.

  2. Deniz says:
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    Hi I want to translate “Showing” “Entries” etc. But I can’t find them in the language file.

Leave a Reply

Your email address will not be published. Required fields are marked *