7 lines
192 B
JavaScript
7 lines
192 B
JavaScript
|
|
/*
|
||
|
|
* Replace - with _ and convert to lower case: en-GB => en_gb
|
||
|
|
*/
|
||
|
|
module.exports = function normalizeLocaleId(localeId) {
|
||
|
|
return localeId && localeId.replace(/-/g, '_').toLowerCase();
|
||
|
|
};
|