qtranslate loading the wrong language

Problem is that events callendar is inited before qtranslate, Tribe__Events__Main::instance() : // let’s initialize tec silly-early to avoid fatals with upgrades from 3.x to 4.x add_action( ‘plugins_loaded’, array( $this, ‘plugins_loaded’ ), 0 ); simple hack was to create a plugin named 1fix with code: add_action( ‘plugins_loaded’, ‘__fix_tribe_init’, 0 ); function __fix_tribe_init(){ global $locale; if(preg_match(‘/^\/ru\//’,$_SERVER[‘REQUEST_URI’])) { … Read more

Creating multilingual glossary for WP

I have replaced this code from functions.php: wp_localize_script( ‘ajax-script’, ‘my_ajax_object’, array( ‘ajax_url’ => admin_url( ‘admin-ajax.php’ ) ) ); } with this: wp_localize_script(“alphabetJS”, “ajaxurl”, admin_url(“admin-ajax.php”)); Then edited javascript jQuery.post(my_ajax_object.ajaxurl, data, function(response) { with this: jQuery.post(ajaxurl, data, function(response) {

Bulk assign posts to a category using SQL (MySQL)

OK, I think I found the answer myself… As stated in the post I linked to: wp_term_taxonomy – defines the taxonomy – either tag, category, or custom taxonomy term_taxonomy_id bigint(20) unsigned NOT NULL auto_increment, term_id bigint(20) unsigned NOT NULL default 0, taxonomy varchar(32) NOT NULL default ”, description longtext NOT NULL, parent bigint(20) unsigned NOT … Read more

When there are two identical entries in a .po file, how does the translation mechanism determine which one to use?

WordPress’ translation mechanism looks not only for the string of the translation functions like __( ‘string’, ‘key’ ). It looks also for the key, in your case the ‘buddyboss-theme’ and search only in a translation file with this key buddyboss-theme-en_US.po. Reference https://make.wordpress.org/polyglots/handbook/plugin-theme-authors-guide/

qTranslate 2.5.28 and WordPress 3.3.1 issues [closed]

In /wp-content/plugins/qtranslate/qtranslate_wphacks.php, line 89, change this: // do some crazy js to alter the admin view $content .=”<script type=\”text/javascript\”>\n// <![CDATA[\n”; $content .=”function qtrans_editorInit1() {\n”; // include needed js functions $content .= $q_config[‘js’][‘qtrans_is_array’]; $content .= $q_config[‘js’][‘qtrans_xsplit’]; $content .= $q_config[‘js’][‘qtrans_split’]; $content .= $q_config[‘js’][‘qtrans_integrate’]; $content .= $q_config[‘js’][‘qtrans_use’]; $content .= $q_config[‘js’][‘qtrans_switch’]; $content .= $q_config[‘js’][‘qtrans_assign’]; $content .= $q_config[‘js’][‘qtrans_save’]; $content .= … Read more