|
|||
|
.NET, Delphi, ... - Sisulizer Localization Tool Support > Technical Support (You need to be registered at the forum to write) > Bugs and Quirks in Sisulizer > captions of radiobuttons in DevExpress TcxRadioGroup not translated back
|
| Moderated by: Renate.Reinartz, Markus.Kreisel, Jaakko.Salmenius, Ilkka.Salmenius | Page: 1 2 |
|
|||||||||||||||
| captions of radiobuttons in DevExpress TcxRadioGroup not translated back - Bugs and Quirks in Sisulizer - Technical Support (You need to be registered at the forum to write) - .NET, Delphi, ... - Sisulizer Localization Tool Support | |||||||||||||||||
| Author | Post | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||
|
ajmol Member
|
Ok, thanks a lot.
|
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
ajmol Member
|
One little question. I found another strange thing. When loading the languages in a combobox the English language is shown as "English" and the resource dll language is shown as "Nederlands". The latter is correct because my OS is Dutch but then I suspect that the first one should be "Engels" and not "English". What I do is the following:
The "Process(LANG_ENGLISH)" is giving me the "English" language but I suspected "Engels". What could be the problem here?
|
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
Jaakko.Salmenius Administrator
|
The "Process(LANG_ENGLISH)" is giving me the "English" language but I suspected "Engels". You suspect right. This is a feature that we forgot to implement. It is not that easy to implement because Windows gives languages names in two languages only: 1) In English (e.g. English, German, Japanese, Finnish, etc) 2) In languages own language (e.g. English, Deutch, 日本語, suomi, etc) I implemented this feature in 284. In order to use it you have to add a string resource that contains the languages names in your original language. If the orignal language is English and you plan to localize into German, Japanese and Finnish create following RC file and add it to your Delphi project. STRINGTABLE BEGIN 7 "German"; 9 "English"; 11 "Finnish"; 17 "Japanese"; END Use the language/locale codes of the languages. You can find the codes from Windows.pas. Look for LANG_xxxxxx contants. If you have the resource then GetWindowsLocaleName uses them if the useNative property is set to True. If there is no resource the function returns value in English (as it does now). I also added a sample in 284 setup. Thank you for pointing this out. Jaakko
____________________ http://www.sisulizer.com - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
Jaakko.Salmenius Administrator
|
<sldir>\VCL\Delphi\RuntimeChange directory contains the sample. Jaakko
____________________ http://www.sisulizer.com - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
ajmol Member
|
Thanks
|
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
ajmol Member
|
Jaakko.Salmenius wrote: The "Process(LANG_ENGLISH)" is giving me the "English" language but I suspected "Engels". Hi, The sample you included in the build 284 works fine but I can't get it working in my program. Is it possible that you can implement it in the sample "DelphiLangChange" because I don't use LaDialog unit. I load the available resources in a combobox like the "DelphiLangChange" sample. But I still get the "English" language and not the "Engels" language and I translated it in Sisulizer using the stringtable.
Last edited on Wed May 27th, 2009 08:22 am by ajmol |
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
Jaakko.Salmenius Administrator
|
Make sure that your EXE really contains those string resources. Jaakko
____________________ http://www.sisulizer.com - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
ajmol Member
|
I did that and I also translated them in Sisulizer. Languages.rc looks like:
Original language in Sisulizer is English and I create a dutch resource dll. Last edited on Wed May 27th, 2009 09:34 am by ajmol |
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
Jaakko.Salmenius Administrator
|
str := GetWindowsLocaleName(locale, True); str := GetWindowsLocaleName(locale, False); Jaakko
____________________ http://www.sisulizer.com - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
ajmol Member
|
I'm confused now When I do:
the languages I see, when my program starts with standard windows language (Dutch), are "Engels" and "Dutch". The first is good but the last not. When I do:
the languages I see, when my program starts with standard windows language (Dutch), are "English" and "Nederlands". The first is false and the last is good. So what is happening here? Also when I change "GetWindowsLocaleName" with "GetWindowsLocaleWideName" then the outcome is:
|
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
Jaakko.Salmenius Administrator
|
Because your populate radio button on run time they are not automatically translate by TLaTranslator. Remember that it only translates the properties that are in the DFM file. After language change you have to translate the radio buttons. procedure TForm1.RadioGroup1Click(Sender: TObject); var i, locale: Integer; code: String; begin locale := Integer(RadioGroup1.Items.Objects[RadioGroup1.ItemIndex]); // Original language is English so use empty language code with English if locale = LANG_ENGLISH then code := '' else code := LocaleToExtension(locale); SetNewResourceFile(code); // Translate the radio buttons for i := 0 to RadioGroup1.Items.Count - 1 do RadioGroup1.Items := GetWindowsLocaleName( Integer(RadioGroup1.Items.Objects), False); end; I have attached modified LangChange sample that shows this. Hope this helps you. Jaakko Attachment: Sample.zip (Downloaded 1 time)
____________________ http://www.sisulizer.com - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
ajmol Member
|
That indeed did it Thanks for the great support.
|
||||||||||||||||
| |||||||||||||||||
| Current time is 09:14 pm | Page: 1 2 |
| .NET, Delphi, ... - Sisulizer Localization Tool Support > Technical Support (You need to be registered at the forum to write) > Bugs and Quirks in Sisulizer > captions of radiobuttons in DevExpress TcxRadioGroup not translated back | |
Sisulizer software localization tool - Three simple steps to localize