How to find when qtranslate plugin’s language changes? [closed]
From qTranslate’s official support forums The function to get the current language is qtrans_getLanguage()
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
I just found this which I applied and works perfectly: If you have your blogs installed in subdirectories you could use this solution: if (strpos($_SERVER[‘REQUEST_URI’], ‘/enblog’) === 0) { define (‘WPLANG’, ‘en_US’); } else { define (‘WPLANG’, ‘pl_PL’); } … and so on. Good luck!
If your just looking for a way for your site to be viewed in other languages I would defiantly recommend using Google Translate Tools. I just add it to the theme: <div id=”google_translate_element”><span id=”trans”>Translate: </span></div> You can hide the Google Logo and funky colors in your css: .goog-logo-link{display:none;} Instead of calling the Google Translate js … Read more
I think and use the way about an WP Multisite install, see my answer, background, information and benefit on a older question.