fix(Localization): BCP47 uses hyphens as separator (#11514)

https://tools.ietf.org/html/bcp47
This commit is contained in:
Victor Berchet
2016-09-12 11:27:15 -07:00
committed by Evan Martin
parent c9ad5e46d6
commit 7b82877ee5
2 changed files with 4 additions and 16 deletions

View File

@ -87,7 +87,7 @@ export function getPluralCase(locale: string, nLike: number | string): Plural {
const f = parseInt(nDecimal, 10);
const t = parseInt(n.toString().replace(/^[^.]*\.?|0+$/g, ''), 10) || 0;
const lang = locale.split('_')[0].toLowerCase();
const lang = locale.split('-')[0].toLowerCase();
switch (lang) {
case 'af':