For different languages i need the decimal and thousands separator, the date and time notation.
In europa most countrys use Comma as the decimal separator and the Point as the thousands separator, in other countrys it is vice versa.
I cannot retrieve this information in javascript from the users client. But i can retrieve the language code, the browser UI use.
So i create a file, the i18n.xml in which the separators and date/time notation for different languages are configurable.
The i18n.xml looks like this:
<languages>
<language code='en'><br/>
<direction>LTR</direction><br/>
<decimalSeparator>.</decimalSeparator><br/>
<thousandsSeparator>,</thousandsSeparator><br/>
<dateFormat>mm/dd/yyyy</dateFormat><br/>
<timeFormat>hh:mm:ss</timeFormat><br/>
</language><br/>
<br/>
<language code='de'><br/>
<direction>LTR</direction><br/>
<decimalSeparator>,</decimalSeparator><br/>
<thousandsSeparator>.</thousandsSeparator><br/>
<dateFormat>dd.mm.yyyy</dateFormat><br/>
<timeFormat>hh:mm:ss</timeFormat><br/>
</language><br/>
<language code='other'><br/>
<direction>LTR</direction><br/>
<decimalSeparator>.</decimalSeparator><br/>
<thousandsSeparator>,</thousandsSeparator><br/>
<dateFormat>yyyy-mm-dd</dateFormat><br/>
<timeFormat>hh:mm:ss</timeFormat><br/>
</language><br/>
<br/>
</languages>
If you have other ideas wich i can solving this problem, plesae let me know.
If you think this is a good idea und you want that your language is inside the i18n.xml by default, write me the language you want, include the separators and date/time notation. thx.