Danish message.po brakes Javascript in 5.3.1.1, why?
Permalink
Hi, I have just finished the danish translation for Concrete 5.3.1. I did a clean install, everything works fine.
When I add "define('LOCALE', 'da_DK');" in /config/site.php, my testsite is Danish, but now javascript is broken. I can't add/edit a block, or add a page using sitemap in dashboard.
When I remove the danish language file in config, javascript and C5 works.
Any ideas?
da_DK/ po and mo files included, or visithttp://svn.concrete5.org/svn/concrete5-i18n/da_DK/trunk/...
When I add "define('LOCALE', 'da_DK');" in /config/site.php, my testsite is Danish, but now javascript is broken. I can't add/edit a block, or add a page using sitemap in dashboard.
When I remove the danish language file in config, javascript and C5 works.
Any ideas?
da_DK/ po and mo files included, or visithttp://svn.concrete5.org/svn/concrete5-i18n/da_DK/trunk/...
Hi Katz, thanks for your reply. But adding lines to htaccess didn't do the trick. Tried on 2 different servers.
I tried loading the i18n_js javascript in header files from another site (5.2), with my old strings, and the javascript worked.
5.2:
http://concrete5.dk//index.php/tools/required/i18n_js...
Special characters ÆØÅ looks weird in javascript source, but works and show perfect on pages.
5.3:
http://demo.concrete5.dk//index.php/tools/required/i18n_js...
Special characters ÆØÅ looks right in source, but javascript doesn't work. Pages have correct characters.
The danish characters ÆØÅ is different in javascript source, maybe I have to solve the problem in poedits encoding?
It's set to UTF-8.
I tried loading the i18n_js javascript in header files from another site (5.2), with my old strings, and the javascript worked.
5.2:
http://concrete5.dk//index.php/tools/required/i18n_js...
Special characters ÆØÅ looks weird in javascript source, but works and show perfect on pages.
5.3:
http://demo.concrete5.dk//index.php/tools/required/i18n_js...
Special characters ÆØÅ looks right in source, but javascript doesn't work. Pages have correct characters.
The danish characters ÆØÅ is different in javascript source, maybe I have to solve the problem in poedits encoding?
It's set to UTF-8.
OK.
Now I see what you mean.
I've tested Danish language files onto my local MAMP.
And I had an exactly same problem...
I briefly took a look at your .po setting.. And I don't see anything wrong. And you should use UTF-8 encoding.
My question was if 5.3.0 was working fine or not?
And next I would take a look at all javascript changes.
And try to find out the problem.
Now I see what you mean.
I've tested Danish language files onto my local MAMP.
And I had an exactly same problem...
I briefly took a look at your .po setting.. And I don't see anything wrong. And you should use UTF-8 encoding.
My question was if 5.3.0 was working fine or not?
And next I would take a look at all javascript changes.
And try to find out the problem.
I found the bug. I had to remove "'" in the danish language string "... concrete5's ..."
In danish we add a 's to make a name plural
Now the javascript (i18n_js.php) works fine in 5.3.x
In danish we add a 's to make a name plural
Now the javascript (i18n_js.php) works fine in 5.3.x
You need to add "\" before that "'".
And then you can use "'"
And then you can use "'"
Thanks a lot for the tip!
I just saw this. Apparently some of the new strings we've added are pretty susceptible to this, and they're all included in i18n_js.php - which is too bad, because if it fails to load then the UI goes down completely.
Thoughts about this? A quick and dirty solution is to add addslashes() calls to wrap all of the t() calls in i18n_js.php but I don't know how sustainable it is. Katz: is addslashes() multibyte safe? Do you know?
Thoughts about this? A quick and dirty solution is to add addslashes() calls to wrap all of the t() calls in i18n_js.php but I don't know how sustainable it is. Katz: is addslashes() multibyte safe? Do you know?
in php.ini
OR .htaccess
ALSO... you may want to try this in your /config/site.php