Closed
Description
There are several places where the term "language" is used, but it's not well defined.
- the profile file name
- LanguageProfile
- LanguageDetector
- DetectedLanguage
As can be seen in the profile file names, the language itself is not always enough. There currently is "zh-cn" and "zh-tw". These are not languages, they are a combination of language with country.
What is needed is a locale. For language, optionally with script and/or region.
Examples:
- zh-Hans-CN
- zh-Hant-TW
Activity
fabiankessler commentedon Feb 2, 2015
I have made some breaking changes. It would have been possible to keep the "language" getters, but because that was conceptually broken anyway, and it's a 0.5 version (early development), I consider this to be the right way to go.
Also, I have renamed the 2 Chinese language profiles to match the new syntax. And the "name" attribute in the files in the very end.
If a user has custom language files in this way, they need to be updated also.
All tests pass.
https://github.com/optimaize/language-detector/issues/26
#26 (temp rename files, windows ...)
#26 (final filename)
#26 adjusted file content