VirtueMart Forum

VirtueMart 2 + 3 + 4 => Language/Translations => Topic started by: Studio 42 on December 12, 2011, 13:28:11 PM

Title: Date formating for translators
Post by: Studio 42 on December 12, 2011, 13:28:11 PM
Hi all nice translators,

To have always a wellformated DATE in the form's using the calendar, Please respect this rules.


in normal case the date must correspond to
http://unicode.org/cldr-apps/survey?_=en_GB&forum=en&xpath=%2F%2Fldml%2Fdates%2Fcalendars%2Fcalendar%5B%40type%3D%22gregorian%22%5D%2FdateFormats%2FdateFormatLength%5B%40type%3D%22short%22%5D%2FdateFormat%5B%40type%3D%22standard%22%5D%2Fpattern%5B%40type%3D%22standard%22%5D
and converted to the right syntax(Change the en_GB after http://unicode.org/cldr-apps/survey?_= to your language code eg. de_DE, fr_FR ...)
to know the good value look in the "English" column
for en_GB it's : M/d/yy

For keys in d:\WEB\wamp\www\Joomla1.7.3\administrator\language\en-GB\en-GB.com_virtuemart.ini
this give :
QuoteCOM_VIRTUEMART_DATE_FORMAT_INPUT="%m/%d/%y"
COM_VIRTUEMART_DATE_FORMAT_INPUT_J16="m/d/y"
COM_VIRTUEMART_DATE_FORMAT_INPUT_JS="mm/dd/y"

input using calendar are now displayed in en-GB >> 12/31/99
To follow unicode standard

Always use only m, d and y for joomla and mm dd and y in JS formating to have the right value in the DB
Title: Re: Date formating for translators
Post by: jjk on December 12, 2011, 16:02:41 PM
Do you think that this will work with different date settings for different languages in multilingual sites?
Title: Re: Date formating for translators
Post by: Studio 42 on December 12, 2011, 20:35:51 PM
This 3 key's are for the DatePicker, if the same rule is applied for the 3 then you can echange for each language,  the days month and years.
but all 3 must have the same format in the same order then the Database and display have always the good string.

If it's not respected then database save are false.
problem is Joomla 1.5 use old syntax,datepicker  javascript another and Joomla1.6+ use PHP directly.
But on thinking, i think i writer a simplier solution next ;)