This repository has been archived by the owner on Jan 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(service): add uniformLanguageTagResolver
This introduces `$translateProvider.uniformLanguageTag()` extending the already existing `$translateProvider.determinePreferredLanguage()` based on the browser's locales. The goal of this feature is getting an uniform language tag regardless of different browsers' language tags. We are starting with threes different kinds: * standard - just like the behavior you already know * en_US -> en_US * en-US -> en_US * en-us -> en_us * en => en * java (everything after a 2nd underscore will be omitted) * en_US -> en_US * en-US -> en_US * en-us -> en_US (different to standard) * en => en * bcp47 (everything after a 2nd hyphen will be omitted) * en_US -> en-US * en-US -> en-US * en-us -> en-US * en -> en http://tools.ietf.org/html/bcp47
- Loading branch information
Showing
2 changed files
with
224 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters