Country code for Japan - ja or jp?

8,243 views
Skip to first unread message

zubin

unread,
Jan 30, 2009, 11:32:30 PM1/30/09
to rails-i18n
Does anyone know what the correct code to use for Japanese
translations?

The ISO country code for Japan is "jp", while the rails-i18n YAML file
for Japanese uses "ja". I realise that either code will work,
provided the requested locale matches the YAML file - I'm just curious
which one is more correct.

Jimmy Stenke

unread,
Jan 31, 2009, 7:55:37 AM1/31/09
to rails...@googlegroups.com, zu...@zenlunacy.com
Hi,

The correct code should actually be ja_JP.
It is built up by <language>_<country>. where country is used for
localization and language for translation if I recall correctly.
Don't remember where the official codes and descriptions are, but it
should be possible to find it with google.

Rails should fall back on language if the full locale is not
available, so it is either ja or ja_JP where ja is used if ja_JP
doesn't exist (or directly specified of course)

/Jimmy

Clemens Kofler

unread,
Feb 1, 2009, 4:08:06 PM2/1/09
to rails-i18n
IIRC "ja" stands for Japanese and "jp" stands for Japan.
Reply all
Reply to author
Forward
0 new messages