Organize a lot of utils
This commit is contained in:
@@ -68,4 +68,19 @@ function getLocaleStrings() {
|
||||
return getServerData().localeStrings;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getLocaleNameFromParams(params) {
|
||||
let locales = getLocales();
|
||||
if(isNaN(params)) {
|
||||
for(let i in locales) {
|
||||
if(toLowerCase(i).indexOf(toLowerCase(params)) != -1) {
|
||||
return locales[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
Reference in New Issue
Block a user