Localization per Dialog

K

Kallis

Hello,
I have the following situation when trying to localize my software:

I have BIG solution with about 80 projects. In one of the projects I
have a number of dialogs (the dialog project :) ). I have decided
that I do not want to use the "form"-mechanism (using the property
"localized=true") for localization since the strings I show are not
that "constant" during the life time of the dialog. Thus, I have to
put the resources in resource files using ResGen, right?

My question is now:
Do I HAVE to have one resource file (per locale) for the entire dialog
project or can I have one res file (per locale) per dialog?? In all
the examples I have seen, there is one resource file per project, not
per dialog/control.... My whish was to make each dialog
"selfcontained" i.e. taking care of its own localization...

Is that possible?

Next question:
Is it possible to call the resGen as a part of the build mech in VS?
It would be so practical if the changes in text files I use as basis
for the res files got "resGened" as a part of the build...

Best Regards
Kallis
 
M

Morten Wennevik

I'm a bit on a limb here, but I think ...

You need 1 satellite assembly (resource file) per culture other than the
default one in your project.
Which one is actually loaded is based on the cultureinfo when you run the
dialog (so you only need a single dialog). Visual studio is fully capable
of doing this.

I suspect you could give each one it's own resource file and have the
specific dialog load its own resource, but it sounds a bit like a overkill
compared since you would still have just as many resource files (not sure
if the satellite assemblies are complete resource files) and an plenty
dialogs to keep track of, compared to a single dialog.

I think the point of localization is actually to hide the locale handling
from the program completely. The only thing it needs to know is which
resource file to read. And changing specific culture text in Visual Studio
is very easy.

Sorry, not familiar with resgen at all, I only did localization a couple
of times as a test, in Visual Studio.
 
M

Mihai N.

I have BIG solution with about 80 projects. In one of the projects I
have a number of dialogs (the dialog project :) ). I have decided
that I do not want to use the "form"-mechanism (using the property
"localized=true") for localization since the strings I show are not
that "constant" during the life time of the dialog. Thus, I have to
put the resources in resource files using ResGen, right?

My advice would be to keep them in the original forms.
This will have two main advantages:
- give some context information for the translators, since most
translation tools can offer a preview of the dialog being translated
- you have to resize the forms after translation.

In general, <<not that "constant">> dialogs are a pretty bad idea
from internationalization perspective.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top