admin管理员组文章数量:1323714
I have a site with polylang installed with 3 languages. LV as default, EN and RU. For the PLURAR(polylang does not support it) strings translation I want to use poedit locally and then copy the translated mo/po files to the child theme /language folder. I tried to translate two string, copied the created mo/po files to the server, but the at the sites frontend transaltion is not shown. I have read multiple manuals and everything should be working, but nothing really happens.
In my child themes /languages folder I even created two types of language code files lv.mo , lv.po and lv_LV.mo and lv_LV.po but nothing happens.
My child themes function.php has definition of language folder.
load_child_theme_textdomain ( 'greattheme', get_stylesheet_directory () . '/languages' );
What could be wrong with my setup?
I have a site with polylang installed with 3 languages. LV as default, EN and RU. For the PLURAR(polylang does not support it) strings translation I want to use poedit locally and then copy the translated mo/po files to the child theme /language folder. I tried to translate two string, copied the created mo/po files to the server, but the at the sites frontend transaltion is not shown. I have read multiple manuals and everything should be working, but nothing really happens.
In my child themes /languages folder I even created two types of language code files lv.mo , lv.po and lv_LV.mo and lv_LV.po but nothing happens.
My child themes function.php has definition of language folder.
load_child_theme_textdomain ( 'greattheme', get_stylesheet_directory () . '/languages' );
What could be wrong with my setup?
Share Improve this question edited Sep 11, 2020 at 9:49 jam asked Sep 11, 2020 at 9:27 jamjam 1732 gold badges3 silver badges15 bronze badges1 Answer
Reset to default 1As per Theme Handbook ⇒ Internationalization, you should call load_child_theme_textdomain()
from within the after_setup_theme
hook:
function load_greattheme_textdomain() {
load_child_theme_textdomain( 'greattheme', get_stylesheet_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'load_greattheme_textdomain' );
Make sure you name your *.mo and *.po files properly (follow the link above).
本文标签: multi languageWhy mo po files are not working with my site
版权声明:本文标题:multi language - Why .mo .po files are not working with my site? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742126290a2421958.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论