summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 19f8a08)
raw | patch | inline | side by side (parent: 19f8a08)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 27 May 2023 14:22:26 +0000 (17:22 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 27 May 2023 14:22:26 +0000 (17:22 +0300) |
src/editor/g_language.pas | patch | blob | history |
index bcb99cabcaa1d79d4a8a60697b569bd088bfad58..41a868f3f375e96cc13cf1a2f620aeb4073e3a3b 100644 (file)
Implementation
Uses
- gettext,
+ gettext, g_options,
SysUtils, e_log, f_main, f_about, f_activationtype,
f_addresource_sky, f_addresource_sound,
f_addresource_texture, f_choosetype, f_keys, f_mapcheck,
end;
procedure g_Language_Set(lang: String);
+ const langfilename = 'editor';
var syslang, fallbacklang: String;
begin
e_WriteLog('g_Language_Set: requested lang is "' + lang + '"', MSG_NOTIFY);
ResetResourceTables;
try
e_WriteLog('g_Language_Set: try language "' + lang + '"', MSG_NOTIFY);
- TranslateResourceStrings('data/lang/editor.' + lang + '.mo');
+ TranslateResourceStrings(LangDir + DirectorySeparator + langfilename + '.' + lang + '.mo');
except
try
e_WriteLog('g_Language_Set: try system language "' + syslang + '"', MSG_NOTIFY);
- TranslateResourceStrings('data/lang/editor.' + syslang + '.mo');
+ TranslateResourceStrings(LangDir + DirectorySeparator + langfilename + '.' + syslang + '.mo');
except
try
e_WriteLog('g_Language_Set: try fallback language "' + fallbacklang + '"', MSG_NOTIFY);
- TranslateResourceStrings('data/lang/editor.' + fallbacklang + '.mo');
+ TranslateResourceStrings(LangDir + DirectorySeparator + langfilename + '.' + fallbacklang + '.mo');
except
e_WriteLog('g_Language_Set: use default strings', MSG_NOTIFY);
end;