ZenphotoCMS Forum
Dynamic-locale and gettext_th - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Translating (https://forum.zenphoto.org/forum-8.html)
+--- Thread: Dynamic-locale and gettext_th (/thread-8250.html)



Dynamic-locale and gettext_th - ruiner - 15-02-2011

When I'm using dynamic locale to change site language, at every instance of gettext_th script shows following error:

Warning: Cannot modify header information - headers already sent by (output started at ........../zp-core/template-functions.php:4186) in ........../zp-core/functions.php on line 1599

What is it?




Dynamic-locale and gettext_th - sbillard - 15-02-2011

Can you tell us please what version of Zenphoto, etc. So we have the data needed to help you.




Dynamic-locale and gettext_th - ruiner - 16-02-2011

Zenphoto 1.4.0.1, live example here: http://ab.maglan.ru/magadan360/ (language selector at bottom).

I'm using gettext_th('string') for all theme strings, /locale/ru_RU/magadan360.po and poedit as described in manual. The gettext('string') working fine.




Dynamic-locale and gettext_th - sbillard - 16-02-2011

Are there .mo and .po files for zenphoto in the ru_RU folder?

Best guess as to what is happening is that Zenphoto is getting a failure trying to restotore the locale settings after the gettext_th call.




Dynamic-locale and gettext_th - ruiner - 16-02-2011

Yes, both .mo and .po files are in ru_RU folder.




Dynamic-locale and gettext_th - acrylian - 16-02-2011

You do really have separate theme translation files as well?




Dynamic-locale and gettext_th - ruiner - 16-02-2011

Sure. And it works fine all the time. I get errors only when using dynamic_locale to switch language.




Dynamic-locale and gettext_th - sbillard - 16-02-2011

I have placed a change in the nightly build for 2/16/2011. Please try this and see if the problem is fixed.




Dynamic-locale and gettext_th - ruiner - 18-02-2011

Everything is OK now. Thank you.




Dynamic-locale and gettext_th - ruiner - 07-06-2013

Hello again.

After some upgrades on my hoster's server function gettext_th is not working anymore. No matter what languase is set, it shows english all the time.

I have checked .po files, all OK. On local server everything is working fine.

You can check it on magadan360.ru.




Dynamic-locale and gettext_th - acrylian - 07-06-2013

Do normal gettext() calls work? Errors in the logs? If not you have to contact your host because then it would be a server issue.