Now defines ${LANG_LangName} as the id of the language when loading a NLF. For example: ${LANG_ENGLISH}=1033
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@993 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
8d3910909d
commit
362687501d
1 changed files with 11 additions and 0 deletions
|
@ -1403,6 +1403,17 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
|
||||||
string_tables.push_back(table);
|
string_tables.push_back(table);
|
||||||
}
|
}
|
||||||
last_used_lang=newNLF->GetLang();
|
last_used_lang=newNLF->GetLang();
|
||||||
|
// define LANG_LangName as "####" (lang id)
|
||||||
|
// for example ${LANG_ENGLISH} = 1033
|
||||||
|
char lang_id[16];
|
||||||
|
char lang_name[128];
|
||||||
|
char *nlf = line.gettoken_str(1);
|
||||||
|
char *tmp = strrchr(nlf, '.');
|
||||||
|
if (tmp) *tmp = 0;
|
||||||
|
tmp = strrchr(nlf, '\\');
|
||||||
|
wsprintf(lang_name, "LANG_%s", tmp?tmp+1:nlf);
|
||||||
|
wsprintf(lang_id, "%u", newNLF->GetLang());
|
||||||
|
definedlist.add(lang_name,lang_id);
|
||||||
}
|
}
|
||||||
catch (exception &err) {
|
catch (exception &err) {
|
||||||
ERROR_MSG("Error while loading language file: %s\n", err.what());
|
ERROR_MSG("Error while loading language file: %s\n", err.what());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue