Comments (7)
en-redross
is not an ISO 639 / IANA standard. zh-Hant
and zh-Hans
are.
It is a best practice to use zh-Hant
and zh-Hans
to avoid ambiguity and political debates. Adding zh
increases ambiguity.
from rails-i18n.
Yes, thank you - that was my initial plan. But then I stumbled upon "By default all country variants (en-US) will fallback to languages first (e.g en)" (not sure if it was part of documentation or just some post) and it felt like "wait a minute is this not working or am I doing something wrong". I guess the omission of base language is not accidental - so I'm closing this issue for now. If I'll notice the same sentence in rails guides or documentation, I'll try suggesting an edit warning that there are possible edge cases where the default fallback doesn't happen.
from rails-i18n.
I don't think it makes sense to this. zh-CN and zh-TW are two fundamentally different scripts, unlike es-ES/es-MX or pt-PT/pt-BR. What we should consider doing instead is switch to the zh-Hans / zh-Hant script convention, rather than using country codes to indicate scripts.
from rails-i18n.
Even if the scripts are different, shouldn't there be some default zh.yml
variant that is the most common/expected version? Are you saying there is no "zh"/"Chinese" language? Is this some kind of weird oriental thing? My logic being:
- There is some language (e.g. English/Spanish/Esperanto/Latin)
- There is a locale file for it
- In case of multiple countries/cultures using the "same language" - there are "country-specific" locale files (from my POV they can be even super crazy/far-from-original variations - doesn't break the logic here)
So if zh-TW is a fundamentally different language than zh-CN, then why are they used as if they are just country specific variations of a language (that apparently doesn't exist) :(
I'm most likely being ignorant/dumb here, so don't take this too seriously 😄
from rails-i18n.
Basically if I invent "en-redross" english variation, that is nothing like english. Does that mean everybody should drop en.yml locale since not all variations are actually english?
from rails-i18n.
Just to double check: am I looking at the wrong place (https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry):
Type: language
Subtag: zh
Description: Chinese
Added: 2005-10-16
Scope: macrolanguage
zh
subtag is mentioned as a language 🤔
Either way, thank you for your responses. I doubt we'll want to change urls on the site from /zh/smth
, to /zh-hant/smth
, so most likely I'll need to do some trickery.
from rails-i18n.
Perhaps you can try using fallbacks? E.g. I18n.fallbacks[:zh] = [:"zh-hant"]
from rails-i18n.
Related Issues (20)
- en locale errors.template.header wrongly reported as having broken data HOT 3
- Missing key: errors.messages.in HOT 2
- Missing key: number.format.round_mode
- thor locales:test en does not report missing keys
- Support for `many` pluralization category (CLDR v41)
- Can't find activerecord errors for de.yml
- Cut a release? HOT 1
- Please release a new version HOT 2
- Abbreviated months in short time format for German
- Passing string in French locale throws the following error "comparison of String with 0 failed" HOT 7
- Translation of strings ending in `.` HOT 2
- Would you be willing to cut a new release? HOT 1
- nb locale uses count in errors.messages.restrict_dependent_destroy.has_one
- `<%= t(:help) %>` outputs entire content of a .yml translation file as a Hash HOT 2
- Transliteration of all-caps strings HOT 2
- Greek long date format translation with grammatical cases HOT 5
- Unnecessary comma in Turkish language
- DE date not localized in errors.messages.greater_than_or_equal_to
- Defining translations for nested forms in namespaced resources HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rails-i18n.