i18n not working
Closed this issue · 3 comments
Hi
I changed the language to French. The change is taken into account on the parameter screen but as soon as I change to another screen whatever it is, it goes back to English...
If I come back to the parameter screen, it turns back to French...
(I didn't check if it's the same with a non admin account)
Hello again,
After a few more tries, it appears that i18n is working quite randomly.
Home=>English, then Share/Photo Gallery ==> French then Forum ==> French then Notifications ==> English then Private Messages ==> French.
I checked the message files and they contain (as far as I could see) the translation for the not translated screens...
I looked to the request headers in both French and English pages and they both have a parameter Accept-Language set to "fr-FR,fr;q=0.5"
Any idea?
[Edit: I restarted the apache and php-fpm services to deal with cache problems as described on https://lingohub.com/blog/2013/07/php-internationalization-with-gettext-tutorial/ but it didn't change anything)
Found the problem. It's due to the Photo Gallery: replacing in inc/gallery_class.php, line 49
T_bindtextdomain('messages', '.././language');
by
T_bindtextdomain('messages', ROOT.'language');
just as the comment just above this line says:
// TODO - this could be fixed by using ROOT
fixes the problem.
I'll do a PR on this. Actually, I had also 2 other problems: exceptions when there is no poll and where there is no family tree (and the plugin is selected). I fixed the first one and probably the second one is the same kind of fix so I'll do also PRs on those bugs.
but I don't really get what it means...
Duplicate