summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2010-04-03 08:25:28 +0200
committerGraeme Geldenhuys <graemeg@gmail.com>2010-04-03 08:25:28 +0200
commit4ea8ef825eb74e49337316bbd2c3c57c06b6f0e8 (patch)
tree619d384adf4d8686e6efd61e6eb25b5a8ca9db23
parent68635efa545d1ab3f5fd6b530ce314efdd8dad4c (diff)
downloadfpGUI-4ea8ef825eb74e49337316bbd2c3c57c06b6f0e8.tar.xz
FixLanguageIDs now also take a var paramater instead of hard-coded value.
-rw-r--r--src/corelib/fpg_translations.pas8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/fpg_translations.pas b/src/corelib/fpg_translations.pas
index b86b5485..f206edf1 100644
--- a/src/corelib/fpg_translations.pas
+++ b/src/corelib/fpg_translations.pas
@@ -157,13 +157,13 @@ begin
end;
// Strip the '.' onwards part. eg: en_ZA.UTF-8 -> en_ZA
-procedure FixLanguageIDs;
+procedure FixLanguageIDs(var ALanguageID: TfpgString);
var
lpos: integer;
begin
- lpos := Pos('.', SystemLanguageID1);
+ lpos := Pos('.', ALanguageID);
if lpos > 0 then
- SystemLanguageID1 := Copy(SystemLanguageID1, 0, lpos-1);
+ ALanguageID := Copy(ALanguageID, 0, lpos-1);
end;
{ TTranslationList }
@@ -213,7 +213,7 @@ end;
initialization
TranslationList := nil;
GetLanguageIDs(SystemLanguageID1, SystemLanguageID2);
- FixLanguageIDs;
+ FixLanguageIDs(SystemLanguageID1);
finalization
TranslationList.Free;