Low Events lang parameter not working on staging site but works fine locally
I'm working on a site with 2 languages and using the transcribe module for most of the work. I have an event calendar listing and for some reason I can't get the months and days to translate to the desired language when a user changes it on the frontend.
It all works completely fine on the local installation but stops working when I push it to my staging server. I'm using git version control and both the files and database should be identical.
The code is simple:
{exp:low_events:next_date date="{segment_2}" unit="month" format="%F %Y" lang="{transcribe:language_name}"}
Even if I remove the transcribe variable and just type in the second language it still doesn't work.
I'm also using the lang parameter on a lot of variables with dates and the same problem is occuring everywhere. The second language is installed fine and the native EE pagination translates ok when I change the control panel language.
Replies
Low 25 Mar 2015 08:18
If it works locally but not on the server, then it's bound to be an environmental problem.
So, are the PHP, EE and LE versions the same across both installs? If not, what are the differences?
Are you sure the language is installed on the server, and the files are complete there?
Dovla 25 Mar 2015 11:18
Thanks for the fast reply :)
I just double checked everything, the php version on the server was 5.3.3. and my local one was 5.5.9...luckily the hosting allows me to choose the php version and I updated it to 5.5.9 as well. All the files are there but the problem still persists. Is there anything else I would need to do after a php upgrade? I can always do another dump of the local database and import it. Language switching inside the admin works fine, the language is definitely installed.
Is there anything else that might be causing this issue? Any particular php setting that might not be set up correctly? I don't have a problem with any other EE addons and everything else is running smooth.
Low 25 Mar 2015 12:17
I'll need to take a look myself. Please send SuperAdmin login credentials to hi at gotolow dot com if you can.
Dovla 25 Mar 2015 13:03
I've emailed you all the information, thanks :)
Low 25 Mar 2015 13:14
Looks like the server has a case sensitive file system. The lang="" parameter should match the folder name of the language, eg. "english" or "croatian". The parameters given are capitalized, eg: "English" and "Croatian". That's why the lang always falls back to English.
If you enter the parameter in lowercase, it should work.
Dovla 25 Mar 2015 13:20
Just tried it out and it works! I renamed the croatian language folder to uppercase and it's all good now, thanks a lot :)