HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Date localization - vanilla 2.1a34
Onia
New
in Localization
I have put the following localized string in my language pack:
$Definition['Date.DefaultDayFormat'] = '%B月%e日';$Definition['February'] = '2';//useless $Definition['March'] = '3';//useless
But in my localized version forum, the dates display something like 'February月23日', 'March月22日'(Should be '2月23日','3月22日').
The months are not correctly localized. Is this a bug of vanilla? Could some one help me on this or give me some clues?
Thanks in advance.
Tagged:
0
Best Answer
-
HalfCat ✭✭
This should work:
$Definition['Date.DefaultDayFormat'] = '%c月%e日';
%B
is not linking to an internal variable but rather formats the Mysql time: http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-format5
Answers
does html lang affect this and utf-8 ? Im no expert in these matters
There was an error rendering this rich post.
Just thinking isnt the date created from php format ( check php date format ) they are using Full Month declaration not numeric value epresentation for month.
There was an error rendering this rich post.
This should work:
%B
is not linking to an internal variable but rather formats the Mysql time: http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-format@HalfCat Thanks a lot for your tips. The
%c
also doesn't work, however, following your given mysql reference,%m
works!Is Vanilla still getting the names of the names of the months from the unix locale settings?
Re:
http://vanillaforums.org/discussion/22190/change-date-format
http://vanillaforums.org/discussion/11275/dates-localization