Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: resource DLL detection magic ?



Permlink Replies: 2 - Last Post: Jun 23, 2015 3:05 AM Last Post By: Andrew Jones Threads: [ Previous | Next ]
Roman Krejci

Posts: 13
Registered: 3/16/00
resource DLL detection magic ?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 27, 2014 6:01 AM
I am currently trying to figure out how to localize projects under XE5.
I have been working with D7 translation manager for a long time, so
I hoped I'll get into it soon. I ran across the "resource not found" problem
early, but this has been fixed by an official update.

What puzzles me now is the following:

I have myprogram.exe and myprogram.XXX resource DLL.
When both reside in the project output directory (either debug, or
production,
does not matter), the resources from the resource DLL are not used when I
launch
the EXE by clicking on it.
When I copy myprogram.exe and myprogram.XXX to any other different
location, the DLL resources are honoured and correct button labels appear.

It does not matter whether XE5 IDE is running or not.

I am lost. How is this possible? I spent hours and hours trying to figure
out why my translations are not working before I discovered this :-(
Is this a feature or what? How can I turn it on/off ?

Roman Krejci
Roman Krejci

Posts: 13
Registered: 3/16/00
Re: resource DLL detection magic ?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 27, 2014 8:16 AM   in response to: Roman Krejci in response to: Roman Krejci
"Roman Krejci" wrote:

I am currently trying to figure out how to localize projects under XE5.
I have been working with D7 translation manager for a long time, so
I hoped I'll get into it soon. I ran across the "resource not found" problem
early, but this has been fixed by an official update.

What puzzles me now is the following:

I have myprogram.exe and myprogram.XXX resource DLL.
When both reside in the project output directory (either debug, or
production,
does not matter), the resources from the resource DLL are not used when I
launch
the EXE by clicking on it.
When I copy myprogram.exe and myprogram.XXX to any other different
location, the DLL resources are honoured and correct button labels appear.

It does not matter whether XE5 IDE is running or not.

I am lost. How is this possible? I spent hours and hours trying to figure
out why my translations are not working before I discovered this :-(
Is this a feature or what? How can I turn it on/off ?

Roman Krejci



Hmm, I think I figured it out

Both production and debug output directories somehow got written to the
registry
under HKEY_CURRENT_USER\Software\Embarcadero\Locales key as value names,
and their value has been set to "en-US". This tells the application that
locale override
should be used and the app looks not for the correct locale DLL extension,
but for the
"en-US" locale extension. Hence the resource DLL for the OS language is
not honoured.

Those names-values are written into the registry when one runs
the "project\ languages \ update localized projects" action, and
the vale written to the registry is the value of the currently "active
language"
of the project.

I have set the "base language" to "en-US" when I ran the resource DLL
wizard.
The "base language" must be set to the language of Delphi version - if I
set it
to the target language, I am in troubles because the translation manager
does
not support translation from the "base language" to the target language IF
both
languages are the same. At least that was the case in D7.

So by choosing "base language" to be "en-US", the "en-US" value became the
default
active language for the project and the locale overrides got written into
registry.

The workaround is to set the "active language" to the target language
immediately
after running the resource DLL wizard and before running the "update
localized projects"
action.

Roman Krejci
Andrew Jones

Posts: 1
Registered: 11/9/13
Re: resource DLL detection magic ?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 23, 2015 3:05 AM   in response to: Roman Krejci in response to: Roman Krejci
Very helpful post, thank you for the workaround!

Roman Krejci wrote:
I am currently trying to figure out how to localize projects under XE5.
I have been working with D7 translation manager for a long time, so
I hoped I'll get into it soon. I ran across the "resource not found" problem
early, but this has been fixed by an official update.

What puzzles me now is the following:

I have myprogram.exe and myprogram.XXX resource DLL.
When both reside in the project output directory (either debug, or
production,
does not matter), the resources from the resource DLL are not used when I
launch
the EXE by clicking on it.
When I copy myprogram.exe and myprogram.XXX to any other different
location, the DLL resources are honoured and correct button labels appear.

It does not matter whether XE5 IDE is running or not.

I am lost. How is this possible? I spent hours and hours trying to figure
out why my translations are not working before I discovered this :-(
Is this a feature or what? How can I turn it on/off ?

Roman Krejci
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02