Translation plugin to translate another plugins
Poedit is the way to go fro translating most of your plugins. WPMl is doing quite a good job, though, at parsing plugins and themes strings for translation purposes. You should give it a try.
Poedit is the way to go fro translating most of your plugins. WPMl is doing quite a good job, though, at parsing plugins and themes strings for translation purposes. You should give it a try.
you can retrieve this identifier with that code : $defaultLanguage = pll_default_language(); $translations = pll_get_post_translations($post_ID); $id = $translations[$defaultLanguage];
You can get the current language with qtranslate using the function qtrans_getLanguage(); and then use it like this for conditionally showing content: <?php if ( qtrans_getLanguage() == ‘en’ ) { //put your code in here } elseif ( qtrans_getLanguage() == ‘de’ ) { //put your code in here } ?>
I ended up having to manually detect the language, here’s how I solved it: <?php if (ICL_LANGUAGE_CODE == ‘fr’) { // display the menu en francais wp_nav_menu( array( ‘menu’ => ‘Navigation principale’, ‘theme_location’ => ‘primary’, ‘container_class’ => ‘menu-header’, ‘menu_id’ => ‘menu-primary-navigation’ ) ); } else { // show them the menu in English wp_nav_menu( array( … Read more
If you want to get the language of the browser do so: $lang = substr($_SERVER[‘HTTP_ACCEPT_LANGUAGE’], 0, 2); If you want to redirect to ?lang=en: header(“location: {$_SERVER[‘REQUEST_URI’]}?lang={$lang}”); You should read about HTTP_ACCEPT_LANGAUGE. There are many ways you can dance with languages but you should understand some key points. Chose the default language of your website (French … Read more
To set a specific language in a multi-site the language files must be available in the language directory, usually in wp-content/languages. So if you want to set the language to ja_JP a file ja_JP.mo must exist there. You can get the language files from the SVN repository.
If the issue is duplicating content to translate a site, it’s better to let a plugin do it, or build your own plugin to deal with it. There are not many of them, and I can cite +WPML, +Multilangual Press and -qTranslate. Related posts: How to change menu according to the language? How to setcookie … Read more
Install the plugin WP Native Dashboard. Then you can set one language for the front-end in your wp-config.php and each user can choose another one for the back-end. See Change language of comments template for details and a screenshot.
Xili language plugin not showing language flag [closed]
Hook in to add new post link wp admin?