Add langCode for English and convert passed value to one format
Fix #8927, close #13272pull/13168/head
parent
dc0c8d6510
commit
20f381e506
|
@ -4262,6 +4262,8 @@ LangType NppParameters::getLangIDFromStr(const TCHAR *langName)
|
|||
|
||||
generic_string NppParameters::getLocPathFromStr(const generic_string & localizationCode)
|
||||
{
|
||||
if (localizationCode == TEXT("en") || localizationCode == TEXT("en-au") || localizationCode == TEXT("en-bz") || localizationCode == TEXT("en-ca") || localizationCode == TEXT("en-cb") || localizationCode == TEXT("en-gb") || localizationCode == TEXT("en-ie") || localizationCode == TEXT("en-jm") || localizationCode == TEXT("en-nz") || localizationCode == TEXT("en-ph") || localizationCode == TEXT("en-tt") || localizationCode == TEXT("en-us") || localizationCode == TEXT("en-za") || localizationCode == TEXT("en-zw"))
|
||||
return TEXT("english.xml");
|
||||
if (localizationCode == TEXT("af"))
|
||||
return TEXT("afrikaans.xml");
|
||||
if (localizationCode == TEXT("sq"))
|
||||
|
|
|
@ -251,6 +251,7 @@ generic_string getLocalizationPathFromParam(ParamVector & params)
|
|||
generic_string locStr;
|
||||
if (!getParamVal('L', params, locStr))
|
||||
return TEXT("");
|
||||
locStr = stringToLower(stringReplace(locStr, TEXT("_"), TEXT("-"))); // convert to lowercase format with "-" as separator
|
||||
return NppParameters::getLocPathFromStr(locStr.c_str());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue