Menu names not getting translated
Menu names not getting translated
Menu names not getting translated
Interface translation without plugins
This problem looks a bit too complicated and localized to come up with a definitive answer, but it looks like an execution order issue. Here are some suggestions what you could check: You are using a variable in your translation function. Do not do this. I’m not sure where that Woocommerce-action is executed, but it … Read more
You must define this filter as early as you can, before it is used anywhere. Best way to do it is to create must-use plugin. I find the concept incredibly usefull since this scripts don’t require any setup like plugins do, and can stage environment for both your plugins and theme. Also they can’t be … Read more
Update setlocale(LC_TIME, “th_TH.UTF-8”); echo strftime(“%A %d %B %Y”, strtotime(get_the_date())); Before: อาทิตย์ 03 มกราคม 2016 //$strdate = get_thai_date(); //print_r($strdate[“number”]); //preg, strstr or others. //$strdate = date_i18n(…); After: อาทิตย์ ๐๓ มกราคม ๒๐๑๖
How to deal with differently translated prepositions?
Already found out: load_textdomain(‘my-text-domain’, TEMPLATEPATH . ‘/languages/’. $my_locale . ‘.mo’); In some cases it could be useful to restore the previous text domain, so we should make a backup. An old function I had hidden in my code that does all, is this one: function __2($string, $textdomain, $locale){ global $l10n; if(isset($l10n[$textdomain])) $backup = $l10n[$textdomain]; load_textdomain($textdomain, … Read more
So as you explained I installed fresh WordPress with woo-commerce and Loco Translate is working fine, I am using storefront theme, So i guess It’s something your theme is not compatible. One thing i found is that when i changed language from English to German and then back to German there were still some words … Read more
_x( ‘Categories’, ‘taxonomy general name’ ) does it make taxonomy general name a text domain? wont it resulting in multiple translation? That taxonomy general name is the gettext or translation context used in the POT file. The text domain is the third parameter, which defaults to default. From the Codex: Sometimes a single term is … Read more
Actually my mistake, I was overriding the translation of the parent theme using it’s text domain for child theme, while I should have defined a different text domain for child theme and load both domains into child theme’s functions.php like this: add_action( ‘after_setup_theme’, ‘mr_load_textdomain’ ); function mr_load_textdomain(){ //for child load_theme_textdomain (MR_DOMAIN,get_stylesheet_directory().’/languages’); //for parent load_theme_textdomain (ET_DOMAIN,get_template_directory().’/lang’); … Read more