Artikkeli on luettavissa ainoastaan tällä kielellä: English
Palaa etusivulle
Tutustu palveluihimme
Työnäytteet
Tekijät
Uutiset
By Boring-Group on 12:26
Artikkeli on luettavissa ainoastaan tällä kielellä: English
Posted in custom & musings | Tagged .mo files, eShop, qtranslate, textdomain, translation | 6 Responses
I am a Sound Engineer turned entrepreneur. CEO of Boring Group Ltd. I am what could be called a cinemaphile crossed with a audiophile.
Why not join the the other 2645 followers that follow me on Twitter
accessibility CAPTCHA Custom custom development custom post_type default language Design eShop external links Filter functions.php get_bloginfo('url') gravity-forms home link Hybrid hybrid theme iframes jQuery new window next posts next_post_link nofollow object page plugin previous posts previous_post_link qtranslate reCAPTCHA SEO shortcode target"_blank" Thesis theme thesis_nav_menu the_excerpt validate validation voted best cms Wordpress Wordpress 3.0 wp_deregister_script wp_list_bookmarks wp_register_script XHTML XHTML strict
Tarjoamme asiakkaillemme laaja-alaisia palveluita digitaalisen median monilla alueilla suunnittelusta toteutukseen.
Hi,
thanks for that article… i was hoping it could help me… but it don’t. I think i don’t see my mistake in this place. Working with woo commerce and on of their templates. All languages files available and can be found under …plugins/woocommerce/lanuages/woothems-xx-xx.mo. I was modifying your code to:
if ( function_exists(‘qtrans_getLanguage’) ) { $locale = qtrans_getLanguage(); load_textdomain(‘woothemes’, realpath(dirname(__FILE__) . ‘/../..’) . ‘/plugins/woocommerce/woothemes-’ . $locale . ‘.mo’); }
But its not working. I’m so frustrated that i have to ask you for help.
Thanks and Regards from the Med.
Alex
Have you tried ?
if ( function_exists(‘qtrans_getLanguage’) ) { $locale = qtrans_getLanguage(); load_textdomain(‘woothemes’, realpath(dirname(__FILE__) . ‘/../..’) . ‘/plugins/woocommerce/languages/woothemes-’ . $locale . ‘.mo’); }
You was missing the / lanuages/
hope it was that simple, if not do ask more help and greetings from the north..
Dont works for me ;/
testet several times on woocomerce, dont work
I have it working now here on my test server. Please check your paths and make sure they are correct. if you still are having problems, please ask over at woothemes support forum..
Nice Clients
For the people having troubles, check the paths, mo files are usually named something as ‘plugin-en_GB.mo’ but &locale will give you back only an ‘en’ flag.
This solution is excellent, but you need to be sure you are pointing to the right thing.
This is how I got it working with Jigoshop for a spanish-english site:
if ( function_exists(‘qtrans_getLanguage’) ) {
$locale = qtrans_getLanguage();
if ($locale == ‘es’){
load_textdomain(‘jigoshop’, realpath(dirname(__FILE__) . ‘/../..’) . ‘/plugins/jigoshop/languages/jigoshop-es_ES.mo’);
}else{
load_textdomain(‘jigoshop’, realpath(dirname(__FILE__) . ‘/../..’) . ‘/plugins/jigoshop/languages/jigoshop-en_GB.mo’);
}
}
Many thanks