Skip to content

Commit

Permalink
Add Intl.getCanonicalLocales
Browse files Browse the repository at this point in the history
  • Loading branch information
Zibi Braniecki committed Apr 7, 2016
1 parent 2fd2654 commit a92f445
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/8.intl.js
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
import {
defineProperty,
} from "./util.js";

import {
CanonicalizeLocaleList
} from "./9.negotiation.js";

export const Intl = {};

function GetCanonicalLocales (locales) {
let codes = CanonicalizeLocaleList(locales);
let result = [];
for (let code in codes) {
result.push(codes[code]);
}
return result;
}

defineProperty(Intl, 'getCanonicalLocales', {
configurable: true,
value: GetCanonicalLocales,
});

0 comments on commit a92f445

Please sign in to comment.