Index: fcl/inc/gettext.pp
===================================================================
--- fcl/inc/gettext.pp	(revision 482)
+++ fcl/inc/gettext.pp	(working copy)
@@ -70,6 +70,7 @@
   EMOFileError = class(Exception);
 
 
+  procedure GetLanguageIDs(var Lang, FallbackLang: string);
   procedure TranslateResourceStrings(AFile: TMOFile);
   procedure TranslateResourceStrings(const AFilename: String);
 
@@ -259,8 +260,6 @@
 end;
 {$endif}
 
-procedure TranslateResourceStrings(const AFilename: String);
-
 {$ifdef win32}
 procedure GetLanguageIDs(var Lang, FallbackLang: string);
 var
@@ -284,15 +283,11 @@
     Lang := FallbackLang+'_'+Country;
   end;
 end;
-{$endif}
 
-var
-  mo: TMOFile;
-  lang, FallbackLanguage: String;
+{$else}
+
+procedure GetLanguageIDs(var Lang, FallbackLang: string);
 begin
-  {$ifdef win32}
-  GetLanguageIDs(Lang, FallbackLanguage);
-  {$else}
   lang := GetEnv('LC_ALL');
   if Length(lang) = 0 then
   begin
@@ -305,7 +300,15 @@
     end;
   end;
   FallbackLanguage := Copy(lang, 1, 2);
-  {$endif}
+end;
+{$endif}
+
+procedure TranslateResourceStrings(const AFilename: String);
+var
+  mo: TMOFile;
+  lang, FallbackLanguage: String;
+begin
+  GetLanguageIDs(Lang, FallbackLanguage);
   try
     mo := TMOFile.Create(Format(AFilename, [FallbackLanguage]));
     try
