How to add extra language packs to WordPress

The easiest way for me is to change language settings for main blog multiple times (as mach as many languages I need) and WordPress will load these languages automatically. And after that I go to Update page and update language packages (loads languages for themes, plugins, etc.)

Make a custom theme translate-ready

To do it properly, you need to generate a valid .mo file and load the text domain in your theme functions.php: function wpse222346_localize_theme() { load_theme_textdomain( ‘your_theme_domain’, get_template_directory() . ‘/languages’ ); } add_action( ‘after_setup_theme’, ‘wpse222346_localize_theme’ ); You can check the WordPress Codex for more info on the load_theme_textdomain function: https://codex.wordpress.org/Function_Reference/load_theme_textdomain Then you would call the translatable … Read more

List of Default Translated Phrases

The list is available in $GLOBALS[‘l10n’][ $text_domain ]. To get the looong list of translatable WordPress strings just use: print ‘<pre>’ . htmlspecialchars( print_r( $GLOBALS[‘l10n’][‘default’], TRUE ) ) . ‘</pre>’; Do not use these strings in your theme or plugin. They are internal, de facto private. They can change any time, even in minor updates. … Read more

Set language per post

I couldn’t find an answer so I ended up providing the solution. It wasn’t simple given that I am not an expert with wordpress nor with php but WordPress documentation is great so here is the solution: // Set the post language when loading up the page based on the store meta function ppl_set_post_language() { … Read more