[Lazarus] DefaultTranslator, LCLGetLanguageIDs and Portuguese language trouble...

Marcelo B de Paula marcbp at terra.com.br
Sat Jan 29 13:12:00 CET 2011


As far as i know, reading Lazarus wiki, these files were standardized as two letters for country ("xx.po").
It seems that the idea was not to have language variations.
Today, we already have some variations implemented, like "af_ZA" and "zn_CN"

So, what to follow. What´s stated on wiki or implementing language variations ?

I see the following possibilities:

- Review the 2 letters standard,
- Release implementation of language variations (IDETranslations will be updated for every new language variation),
- Normalize locale returns in LCLProc to map the correct 2 letters. Currently the code for Linux returns only the first 2 letters of Locale (ex. "pt_BR" returns "pt")
  - Any portuguese language variations here could be solved only mapping "pt" to "pb". Or we can rename the files from "pb.po" to "pt.po"
  - Other languages have to follow the same rule. So, "en_US" and "en_GB" will be simple "en", thus mapping to "en.po" files.

Regards,

Marcelo

  ----- Original Message ----- 
  From: Mattias Gaertner ; Mattias Gaertner 
  To: Lazarus mailing list ; Lazarus mailing list 
  Sent: Saturday, January 29, 2011 6:40 AM
  Subject: Re: [Lazarus] DefaultTranslator,LCLGetLanguageIDs and Portuguese language trouble...





  Hans-Peter Diettrich <DrDiettrich1 at aol.com> hat am 29. Januar 2011 um 07:05 geschrieben:

  > Maxim Ganetsky schrieb:
  >
  > >> I really don´t know why these files was standardized with "pb" instead
  > >> of "pt".
  > >
  > > Please check if LazDE translation works when you rename its .pb.po file
  > > to .pt_BR.po.
  > >
  > > If it works, we can solve all these problems by renaming all .pb.po
  > > files to .pt_BR.po.
  >
  > Why a distinction between Brasilian and other Portuguese here?
  >
  > How are en_US, en_GB etc. handled? 


  The algorithm first searches for the "en_US", then "en", finally the default translation.

  Because the main language id 'pt' differ from 'pb' a different po file is used.

  Maybe pb could be used as fallback for pt and vice versus in translations.pas.



  Mattias


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110129/23ae8467/attachment-0003.html>


More information about the Lazarus mailing list