Translation & RTL

Translation

1. Make a new translation from Parent theme

Video-Pro is a WMPL-compatible and multi-language-ready theme. To translate this theme:

  • Download and install this tool POEdit
  • Open POEdit and load [/videopro/languages/videpro.po]
  • Translate the text and save the file
  • A file named videpro.mo is created. Save it in /videopro/languages/ folder. Rename it with Code Name of your language. For example, de_DE.mo for German – Deutsche. See language code list here http://codex.wordpress.org/WordPress_in_Your_Language
  • For WordPress 4.0 and above, go to Settings > General and choose Site Language
  • For WordPress 3.9.2 and below, open [{wordpress root}/wp_config.php] and find this line define(‘WPLANG’, ”);. Change it with your language code, for example define(‘WPLANG’, ‘de_DE’);

2. Translate from Child theme.

Similar to translate from Parent theme, follow these steps if you want to translate from Child theme:

  • Copy the language folder from themes\videopro to themes\videopro-child
  • Make a new translation follow the above steps.
  • Copy this code to themes\videopro-child\functions.php, in which videopro‘ is the text domain of VideoPro theme
/**
* Loads the child theme textdomain.
*/
function wpdocs_child_theme_setup() {
load_child_theme_textdomain( 'videopro', get_stylesheet_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'wpdocs_child_theme_setup' );
  • Save the functions.php file.
  • For WordPress 4.0 and above, go to Settings > General and choose Site Language

3. Update an Older Translation

If you’ve previously translated an older version of a theme then update your site to the latest version. You’ll notice the translation file no longer works correctly. This is due to the fact that some theme strings have changed and the old .mo language file doesn’t have translations for those strings.

  • Open your old translated .po file in Poedit
  • From the menu, choose Catalog > Update from POT file, and select your new videopro.pot file from the theme language folder
  • Poedit will show you what text is new and needs to be translated
  • After you have translated the new text, save the project, which will also generate your new .mo file
  • Save your updated .po and .mo file, then name the .mo file in a correct format. For example, de_DE.mo for German – Deutsche

RTL

VideoPro also supports RTL – Right To Left languages. If your language is RTL, go to Appearance > Theme Options > General > RTL mode and check Enable RTL
NOTE: The Left and Right sidebars still have the same positions on both RTL and LTR modes.
VideoPro-RTL-Mode