Collect strings for localication

A

Andrus

I have a lot of localizable strings enclosed in double quotes in cs source
files.

I'm looking for a tool which extracts all those strings for localizaton to a
single file.

Or even better, it should generate resource file and replace all string
constants with localizable calls like

ResourceManager.GetString( Resources.MyString )

Any idea ?

Andrus.
 
F

Fredo

It's much better to do this kind of thing by hand. Here are just a few
reasons why you don't want an automated tool for it:

Usually string replacements are done with some sort of name/value system.
You provide a name constant for the string which is then used in the code
via ResourceManager.GetString() or some other system. What names should be
given to the name constants? No automated tools is going to be able to come
up with something that really makes sense. It'll likely just come up with
STRING1, STRING2, STRING3, etc, or something along those lines.

Let's say your code does a lot of string output and in various places you
have the strings "\n" or "\r\n". Does the tool create a single resource for
all occurances of identical strings or does it create a different one for
each occurance? That will likely depend on what makes sense in a given
situation.

Some strings you don't want to replace. For example, you might not want to
replace the aforementioned "\n" and "\r\n" text.

Oftentimes strings are used internally and are never displayed to the user.
These strings don't need to (and often shouldn't, for performance reasons)
be replaced by some sort of string lookup.

These are just a few of the reasons why this should be done by hand, as
tedious as it is.

Additionally, it's always harder going back and trying to localize an app.
If there's a good chance your app is going to get localized, it ALWAYS pays
to do it up-front. I work on a fairly large project that's localized into 12
languages and we knew from day 1 it would be localized. It was still a pain
in the butt, but it would have been FAR more difficult if we hadn't planned
it from the beginning.
 

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