How to have multiple site (UI) languages?
How to have multiple site (UI) languages?
How to have multiple site (UI) languages?
Assuming you’re talking about the front-end and you have your strings properly internationalized, you just need to insert the load_theme_textdomain() function to tell wordpress where are your .po files. this is how the Toolbox Theme does it: /** * Make theme available for translation * Translations can be filed in the /languages/ directory * If … Read more
I found a solution, realy dirty, but works. In the core.php file of the polylang plugin I found this stuff: // NOTE: I believe there are two ways for a plugin to force the WP language // as done by xili_language and here: load text domains and reinitialize wp_locale with the action ‘wp’ // as … Read more
From qTranslate’s official support forums The function to get the current language is qtrans_getLanguage()
Basically read the source for the function load_plugin_textdomain(): function load_plugin_textdomain( $domain, $abs_rel_path = false, $plugin_rel_path = false ) Ignore the second parameter, it was deprecated a long time ago. An example from my plugin T5 Taxonomy Location: protected function load_language() { load_plugin_textdomain( ‘plugin_t5_tax_location’, FALSE, plugin_basename( dirname( __FILE__ ) ) . ‘/languages’ ); } The first … Read more
If your site has the same content in both languages, you may try the plugin I have written called Transposh, which allows you to handle this with ease. Support for RTL languages is embedded, where the theme has support for this. On the default themes it works quite well. If you have different content for … Read more
Add a locale filter add_filter(‘locale’, ‘locale_filter’); and in the filter return the locale of your choice, function locale_filter($locale) { return “whatever”; } however, this needs to be done in context, your mail sending trigger will need to know the target user and get the locale from there, not very easy, although doable.
No, they were never there. The link you posted is for WordPress.com hosted blogs, not self-hosted WordPress.org software. Refer to Installing WordPress in Your Language for info on use in other languages.
Yes, sort of. Any localized plugin such as WP-Members runs off of the “locale” that WordPress is set to. This value can be filtered for WP as a whole using the locale filter. But it can also be filtered for plugins using plugin_locale See: https://developer.wordpress.org/reference/hooks/plugin_locale/ To use plugin_locale specific to the text domain for the … Read more
No, it doesn’t work that way. Taxonomy terms and posts are in a n:n relation: each term may be assigned to multiple posts and each post to multiple terms. But you probably want to set just one main language per post – taxonomies are the wrong tool for that. Use post meta data or a … Read more