• Resolved mirioki02

    (@mirioki02)


    Hi,

    I’m currently using Polylang plugin to setup a multilingual site.

    I’m not using the language switcher widget but referred to the function from the widget to get the links to the respective pages. This part is working fine. I can switch from English to Chinese for a particular page.

    However, I’m having trouble getting get translated text for theme and plugin content. The text are wrapped in __() and _e() functions and I have the .mo file in the languages folder but I’m still getting the English text.

    I’m hooking the theme_textdomain to the “after_setup_theme” and the plugin_textdomain to the “init” action in my theme’s functions.php file. I’m wondering if it’s because I’m using manual link redirection and WPLANG or some other language option is not set. However, even after I set my WP General Settings Site Language to Chinese, the texts are still in Chinese.

    Can anyone point me to the right direction ?

    Thank you

Viewing 1 replies (of 1 total)
  • Thread Starter mirioki02

    (@mirioki02)

    I figured it out. The Language settings was set wrongly, that’s why the the mo files where not loaded correctly. Once I change the settings, the theme and plugin’s texts were translated correctly.

Viewing 1 replies (of 1 total)
  • The topic ‘How to load theme and plugin mo file’ is closed to new replies.