Skip to content

Replace "Language" with "Locale" #26

Closed
@fabiankessler

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

fabiankessler commented on Feb 2, 2015

@fabiankessler
ContributorAuthor

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.

added 4 commits that reference this issue on Feb 2, 2015

#26 (temp rename files, windows ...)

#26 (final filename)

#26 adjusted file content

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Replace "Language" with "Locale" · Issue #26 · optimaize/language-detector