Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To use Woffice in your own language, you must turn your WordPress admin site into this language from the WordPress settings. 

See this article for more details. 

Otherwise, you can force WordPress to use a specific language by adding this line to your wp-config.php file: 

Code Block
define ('WPLANG', 'pt_BR');

Where pt_BR is your language code. 



Panel
titleOn this page

Table of Contents




How to translate Woffice

Woffice, as any other WordPress theme is using .po / mo files to handle the translation. 

  1. Download PoEdit or any software that can edit .po files. 
  2. Go to woffice/languages/ 
  3. Open the .po associated with your language, like fr_FR.po if you are french. 

    Info
    titleNo .po matching your language code?
    Then, you will need to create it. You can follow this tutorial. But also use the woffice.pot file which is included for that reason. The idea will be for you to generate a .po matching your language / country code. Once done, the .mo file will be generated automatically.


  4. Make sure to update it, indeed we add new strings in every update so you want to make sure you have the last version. 
    In PoEdit, when the .po is opened, go to Catalog > "Update from sources" or "Update from POT file".

    Image Added

  5. You can now make all your translations, whenever you will save that file it will generate a .mo file automatically. 
  6. We do not recommend you to leave these files in the parent theme (wp-content/woffice) but rather advise you to move them to your child theme's languages/ folder. If it does not exist, create it. 
    WordPress will pick up those translations automatically. 
  7. In case the language files don't work from the child theme languages directory, you can paste the snippet of code below to your functions.php file from your woffice-child directory, it will make sure the WordPress loads the language files from the child theme instead of the parent theme, here is the code:
Code Block
languagephp
function woffice_child_theme_locale() {
    load_child_theme_textdomain( 'woffice', get_stylesheet_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'woffice_child_theme_locale' );

Multi-languages site

If you want your site to be available in several languages, we advise you to use WPMLIt is compatible with the theme and a language switcher will be added automatically in your top bar (if you checked the option in the theme settings).

Available languages

Thanks to many customers woffice is already translated in: 

  • English
  • Russian
  • Japanese
  • French
  • Spanish
  • Italian
  • Dutch  
  • German
  • Arab
  • Portuguese 
  • Hebrew 
  • Turk 
  • Persian
  • Brazilian Portuguese
  • Bulgarian
  • Iranian

The language .po files can be found in woffice/languages/


Warning

Due to the fact that we add new strings in pretty much every update, most if those files are not complete. You are free to improve the translations and if possible send them back to us so we can update them on our side, your name will be mentioned in the changelog. 

Translating BuddyPress strings

Please follow the official BuddyPress guide for that. 


Tip

For the plugins, given that the Woffice translation files are only taking care of the theme's translations, you need to translate the plugin's .po file. It works exactly the same way.

There is an example / explanation here: http://wpsleek.com/pro-event-calendar-documentation/ for the Calendar event plugin. 

However, most of them let you translate their "strings" though the admin panel, so it's even easier.