On Thu, 12 Jul 2007 23:16:52 +0200
"A.J. Venter" <[EMAIL PROTECTED]> wrote:

> Thanks everybody,
> By combining this with one other hunch, I have it working, I used
> Mattias' example code, at first it still failed, until I changed my
> call as follows:
> LC_MESSAGES="af" ./oklin
> 
> I don't know why, but LANG does not seem to override LC_MESSAGES

Do a 'Find declaration' on GetLanguageIDs:

  lang := GetEnv('LC_ALL');
  if Length(lang) = 0 then
  begin
    lang := GetEnv('LC_MESSAGES');
    if Length(lang) = 0 then
    begin
      lang := GetEnv('LANG');
      if Length(lang) = 0 then
        exit;   // no language defined via environment variables
    end;
  end;


That's why lazarus wants the fpc sources.

Mattias


> 
> Either way, it's working, thanks everybody.
> 
> A.J.
> 
> On 7/12/07, Mattias Gaertner <[EMAIL PROTECTED]> wrote:
> > On Thu, 12 Jul 2007 22:35:40 +0200
> > "A.J. Venter" <[EMAIL PROTECTED]> wrote:
> >
> > > > And there are two TranslateUnitResourceStrings functions. The
> > > > one with 4 parameters expects the file mask, the other a
> > > > specific .po file. If the file does not exist it returns false.
> > > In which unit is this second one declared ?
> >
> > Both are defined in lcl/translations.pas.
> >
> > > ? And which one should I use ?
> >
> > See the example: The function with 4 parameters.
> >
> >
> > > > Try this:
> > > >   GetLanguageIDs(Lang,FallbackLang);
> > > >   TranslateUnitResourceStrings('oklinmainunit',
> > > >     LANGPATH+PathDelim+'oklin.%s.po',Lang,FallbackLang);
> > > I'll try this
> >
> > The GetLanguageIDs is defined in gettext.
> >
> > Mattias
> >
> > _________________________________________________________________
> >      To unsubscribe: mail [EMAIL PROTECTED] with
> >                 "unsubscribe" as the Subject
> >    archives at http://www.lazarus.freepascal.org/mailarchives
> >
> 
> 

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to