Project compiled with Delphi 2010 don't uses the VCL in French

Hi,

It seems like Finalbuilder compiles my project using the VCL in english instead of the VCL in french : message boxes shows "Yes" "No" buttons instead of "Oui" "Non".

Any ideas ?

-- Pierre

Did you set the Language on the Delphi Action’s Version Info Page?

Vincent,

Yes, In thet Compiles/Borland Delphi/General Options/Default Language I defined :

Default Locale ID : Français (France) $040C

Default CodePage : 1252 Windows 3.1 Latin 1 (US, Western Europe)

My applications are still compiled with messages boxes in english.

Note that I have defined a "Project Variable" LC_MESSAGES [en_US] in order to make subversion parsing of output messages tp work.

If you build using delphi, then take a copy of the project.res file, and then build using FB, and take a copy of the project .res file, send us both files so we can take a look and see what finalbuilder is doing differently. Send them to support at finalbuilder dot com

Done. Both files have been sent to support email.

Hi Pierre

Thanks, got those, however they were identical when I looked at them with a resource tool. I’m not sure what else controls the language that the applications uses for message boxes etc, I always thought it was the locale settings. I will have a look and see if there is anything else we can set. One thing you could do to create a simple new project in delphi, one that shows a message box or at least does something to show the problem, and then build it using finalbuilder and see if that has the same issue. I am wondering if the problem application is linking in another resource file somewhere that is changing the locale?

I reproduced the problem with a very simple Delphi Application : a TButton on the main TForm runs this code :

MessageDlg('Est-ce que cette boîte de dialogue s''est ouverte en français ?', mtWarning, [mbYes, mbNo], 0);

Compiled with Delphi 2010, the MessageBox shows buttons in French (Oui/Non), compiled with a FinalBuilder Project based on the one I created for mu application, the compiled Exe shows buttons in english (Yes/No)

I can send have sent you the FinalBuilder Project File and the sample application to the FinalBuilder support email.


Can you send the compiled versions? I looked at the source but that didn’t help, couldn’t find anything to suggest why this happens.

Did you have an english version of D2010 installed at any time? The only explanation I have for this is FinalBuilder is possibly using a different library path. The strings for the messagebox buttons is in consts.pas, so for the language to change, there must be a different version of that file being pulled into the exe when compiled using FB and dcc32. FinalBuilder gets the library path from the registry. Try overriding the library path and setting it to the bare minimum to compile.



I have installed Delphi 2010 with VCL in French and English (not Japanase) this is a new feature from D2010.

Considering there are these registry values in HKEY_LOCAL_MACHINE\SOFTWARE\CodeGear\BDS\7.0\Library :

Translated Debug Library Path : $(BDS)\lib\$(LANGDIR)\Debug
Translated Library Path : $(BDS)\lib\$(LANGDIR)
Translated Resource Path : $(BDS)\lib\$(LANGDIR)

Maybe I have to define a variables LANGDIR with value "FR" and expose it as an environment variable ?

 

Tested: That don't work.

Hi Pierre

Looks like this is a new thing for Delphi 2010, I have those settings in my registry as well. The LANGDIR variable is blank on mine, I’m guessing on yours it is set to FR ?

What we will need to do is add support for that, I will change the action to look for the LANGDIR and if has a value then we will use the value from the Translated Library Path. Can you tell me which files are in the “RAD Studio\7.0\lib\FR” folder? Is the entire lib contents there or just some files (like consts.dcu)?

Now we know where to look we should be able to resolve this, hopefully we will have a build with the change available tomorrow.

C:\Program Files\Embarcadero\RAD Studio\7.0\lib>dir fr
 Le volume dans le lecteur C n'a pas de nom.
 Le numéro de série du volume est 3CF6-2ED8

 Répertoire de C:\Program Files\Embarcadero\RAD Studio\7.0\lib\fr

24/09/2009  09:07              .
24/09/2009  09:07              ..
19/08/2009  22:00           134 122 ActnRes.dfm
19/08/2009  22:00            56 542 AdaptReq.dcu
19/08/2009  22:00            10 199 AdoConEd.dcu
19/08/2009  22:00             2 914 ADOConst.dcu
19/08/2009  22:00             9 851 bdeconst.dcu
19/08/2009  22:00             1 952 BrkrConst.dcu
19/08/2009  22:00             2 602 ComConst.dcu
19/08/2009  22:00             5 150 ComStrs.dcu
19/08/2009  22:00            40 081 Consts.dcu
19/08/2009  22:00               503 CtlConsts.dcu
19/08/2009  22:00            11 742 CustomizeDlg.dfm
19/08/2009  22:00             6 043 DBClientActnRes.dfm
19/08/2009  22:00            14 439 DBConsts.dcu
01/08/2009  22:00             6 921 DBDrvEd.dcu
19/08/2009  22:00            15 024 DbgSiteAS.dcu
19/08/2009  22:00             2 194 DbLogDlg.dfm
19/08/2009  22:00             1 678 DBPWDlg.dfm
01/08/2009  22:00             1 591 DBXClientResStrs.dcu
01/08/2009  22:00            16 660 DBXCommonResStrs.dcu
01/08/2009  22:00            54 063 DBXCommonTable.dcu
01/08/2009  22:00            29 447 DBXDataStoreMetaDataReader.dcu
01/08/2009  22:00            34 211 DBXMessageHandlerCommon.dcu
01/08/2009  22:00            27 675 DBXMessageHandlerJSonClient.dcu
01/08/2009  22:00            20 623 DBXMessageHandlerJSonCommon.dcu
01/08/2009  22:00            31 995 DBXMessageHandlerJSonServer.dcu
01/08/2009  22:00           153 291 DBXMetaDataReader.dcu
01/08/2009  22:00            82 287 DBXMetaDataWriter.dcu
01/08/2009  22:00            55 450 DBXPlatform.dcu
01/08/2009  22:00           137 566 DBXStream.dcu
01/08/2009  22:00               472 DBXTestResStrs.dcu
01/08/2009  22:00            33 639 DBXTransport.dcu
01/08/2009  22:00            13 801 DBXTransportFilter.dcu
19/08/2009  22:00            45 568 dcl31w.lib
19/08/2009  22:00            67 072 dclado.lib
19/08/2009  22:00           409 088 dclbde.lib
19/08/2009  22:00           257 024 dcldb.lib
19/08/2009  22:00            67 584 dclmid.lib
19/08/2009  22:00           464 384 dclnet.lib
19/08/2009  22:00           454 144 dclstd.lib
19/08/2009  22:00               606 dclusr.dpk
24/09/2009  09:07              debug
...

Note that I've tried to create a pseudo environment variable en finalbuilder and set it to "FR" anf that don't work (or I missed something ?)

Also note that I've no LANGDIR environment variable defined System Wide.

But when I launch the "RAD Studio Command Line" and type C:^>set L, I can see that LANGDIR is set to FR.

Hope this helps.

Why does that don't work when I define a LANGDIR variable in my FinalBuilder projet and check the box "Make available as an environment variable" ?

-- Pierre

Oh, in Delphi 2010 IDE, when I go to options/Environment Options/Environment Variables, in the top list "System Variables", I can see that LANGDIR is defined to FR.

The problem is we are not reading in the registry value for the “Translated Library Path”, we had no idea it existed, it’s new in D2010 and not documented anywhere that I could find. I’ll fix that today.

Ok, here we go :

https://www.finalbuilder.com/downloads/finalbuilder/630/FB630_1847.exe

This build does the following. If the VCL/RTL Language setting in the registry (MUI) is set to anything other than empty when FB starts up, it will define a variable called LANGDIR with the value as specified in the registry. When the .cfg file is generated for the command line compiler, the LANGDIR variable is checked, if it’s value is non blank then the Translated Library Path is read from the registry and pre-pended to the library path.

I re-installed D2010 today, and installed all the languages, and test with your test application and it worked fine in all languages supported. The advantage of using the technique described above is that a simple variable override is enough to change the language… if your D2010 install is set to FR, and you want to compile for DE, just add a project variable called LANGDIR, set it to DE.

HTH

Just tested your Build 1037. It works only if I define a variable exposed as an environment variable called LANGDIR with the value FR. If I delete this variable and I rebuild the project the MessageBox is in english.

Have a look under System Variables in FinalBuilder, is there a LANGDIR variable there? If it is, what is the value? If not, can you have a look in your registry, do you have a key HKEY_CURRENT_USER\Software\CodeGear\BDS\7.0\MUI with a value for “Translated Library Directory” ? That was the only place I could detect where the language is set. I tested this using the BDSSetLang.exe tool in the “RAD Studio\7.0\bin” folder, by setting the Library Language.

Vincent,

I checked in my registry and I have no key "MUI" at all in : HKEY_CURRENT_USER\Software\CodeGear\BDS\7.0. I think this key is created by BDSetLang.exe, but I never used BDSetLang since I installed RAD Studio in French with, as an options, the english version of the VCL.

I found that key : HKEY_LOCAL_MACHINE\SOFTWARE\CodeGear\Locales where there are several path for Embarcadero executables like : C:\Program Files\Embarcadero\RAD Studio\7.0\Bin\bds.exe and the value is 'FR', this key is also in HKEY_CURRENT_USER\Software\CodeGear\Locales

Regards,

-- Pierre