Specifically I'm trying to set up a countries model in my rails application that will contain the locale settings used by Rails i18n.
I have found conflicting information about how Great Britain is represented.
According to this source it is en-GB https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale
But according to this source it is en-U开发者_如何学CK http://guides.rubyonrails.org/v2.3.8/i18n.html
is it GB or UK, or does it matter?
It should be GB
because the 2-letter country codes should correspond to those in ISO 3166 http://www.davros.org/misc/iso3166.html
I believe it is not uncommon to treat UK
as an alias for GB
, and as such support both.
It depends on Rails version. In 2.x it was en-UK
, and then for Rails 3 it was changed to en-GB
.
精彩评论