From 4ea8ef825eb74e49337316bbd2c3c57c06b6f0e8 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Sat, 3 Apr 2010 08:25:28 +0200 Subject: FixLanguageIDs now also take a var paramater instead of hard-coded value. --- src/corelib/fpg_translations.pas | 8 ++++---- 1 file 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; -- cgit v1.2.3-70-g09d2