Open frankapimenta opened 2 years ago
All the data comes from the countries
gem, and that gem does have a lot of translations, but it doesn't specifically deal with regional locales.
The base country data for Switzerland is https://github.com/countries/countries/blob/832ac5afd68ff467758f722fc6f330a8831b75ee/lib/countries/data/countries/CH.yaml and it includes the list of languages, but not the actual locale identifiers.
I'll add a ticket to countries
to add the locales, it makes sense to have this data.
I don't know where those locales you mention are coming from, because the proper identifiers should be fr-CH
, de-CH
and it-CH
. The format is <language>-<countryCode>
.
If you configure I18n.available_locales
or directly for the countries
gem (see here) and add :fr, :de, :it
then the translation data for these languages will be loaded.
Some countries have different cultural regions (Spain (Basc country, Catalonia), Belgium (fr, nl), Switzerland (it, fr, de as example). Is there a way to add this specification to the gem?
I see that for Switzerland
has
Would be nice to have this as culture specification of the country. For example:
and have locales as a options of the values of the select options (dropdownlist).