473,398 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Collect strings for localication

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.
Feb 14 '08 #1
1 1260
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.

"Andrus" <ko********@hot.eewrote in message
news:OU**************@TK2MSFTNGP03.phx.gbl...
>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.

Feb 14 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: LP | last post by:
Hi, Considering code below. Will it make GC to actually collect. One application creates new instances of a class from 3rd party assembly in a loop (it has to). That class doesn't have .Dispose or...
9
by: Frank Rizzo | last post by:
I understand the basic premise: when the object is out of scope or has been set to null (given that there are no funky finalizers), executing GC.Collect will clean up your resources. So I have...
5
by: Mrinal Kamboj | last post by:
Hi , Any pointers when it's absolute necessary to use it . Does it has a blocking effect on the code , as GC per se is undeterministic . what if GC.collect is followed in next line by...
5
by: mythili123 | last post by:
Hi I have difficult undersating this problem Read data from a I/P file.Ignore all lines that start with the literal string given as a command line argument. Otherwise, collect and count the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.