473,397 Members | 2,028 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,397 software developers and data experts.

message localization

Hello everyone,
I want to print out and log localized message according to current locale of
machine. For example, if I am always use MESSAGE_ERROR macro in my program,
and I want to replace it with "Error" when the locale is en_US and be
replaced with French if the locale if Fr.

I am wondering whether Visual Studio 2005 provide some existing technology
or some resource file which I could utilize? For example, I could define
MESSAGE_ERROR macro to "error" if locale is English and define to other
values if other locale is set. I do not want to change any source codes if
necessary. I am developing unmanaged C++ DLL using Visual Studio 2005.
thanks in advance,
George
Oct 23 '07 #1
4 1318
I am wondering whether Visual Studio 2005 provide some existing technology
or some resource file which I could utilize? For example, I could define
A Message Compiler could be use for that purpose.

http://msdn2.microsoft.com/en-us/library/aa385633.aspx
cordialy,

Crest
Oct 23 '07 #2
I want to print out and log localized message according to current locale
of
machine. For example, if I am always use MESSAGE_ERROR macro in my program,
and I want to replace it with "Error" when the locale is en_US and be
replaced with French if the locale if Fr.

I am wondering whether Visual Studio 2005 provide some existing technology
or some resource file which I could utilize? For example, I could define
MESSAGE_ERROR macro to "error" if locale is English and define to other
values if other locale is set. I do not want to change any source codes if
necessary. I am developing unmanaged C++ DLL using Visual Studio 2005.
Create a resource file, with string tables.
Then you can load the string using ... LoadString :-)
You can use resources to localize dialogs, menus, icons and bitmaps, a lot of
stuff beyond plain strings.

The best practice is to create resource-only DLLs (or satelite DLLs), one per
language. Then you load the one you need (LoadLibrary) and load the resources
from there.

A good place to start: http://msdn2.microsoft.com/en-us/library/ms776201.aspx
Although it looks like Vista only, some of the stuff also applies to previous
versions, see http://msdn2.microsoft.com/en-us/library/aa365002.aspx
--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
Oct 24 '07 #3
Thanks Crest,
Good links!
regards,
George

"Crest Teethgel" wrote:
I am wondering whether Visual Studio 2005 provide some existing technology
or some resource file which I could utilize? For example, I could define

A Message Compiler could be use for that purpose.

http://msdn2.microsoft.com/en-us/library/aa385633.aspx
cordialy,

Crest
Oct 24 '07 #4
Thanks for your comprehensive answer Mihai!
regards,
George

"Mihai N." wrote:
I want to print out and log localized message according to current locale
of
machine. For example, if I am always use MESSAGE_ERROR macro in my program,
and I want to replace it with "Error" when the locale is en_US and be
replaced with French if the locale if Fr.

I am wondering whether Visual Studio 2005 provide some existing technology
or some resource file which I could utilize? For example, I could define
MESSAGE_ERROR macro to "error" if locale is English and define to other
values if other locale is set. I do not want to change any source codes if
necessary. I am developing unmanaged C++ DLL using Visual Studio 2005.

Create a resource file, with string tables.
Then you can load the string using ... LoadString :-)
You can use resources to localize dialogs, menus, icons and bitmaps, a lot of
stuff beyond plain strings.

The best practice is to create resource-only DLLs (or satelite DLLs), one per
language. Then you load the one you need (LoadLibrary) and load the resources
from there.

A good place to start: http://msdn2.microsoft.com/en-us/library/ms776201.aspx
Although it looks like Vista only, some of the stuff also applies to previous
versions, see http://msdn2.microsoft.com/en-us/library/aa365002.aspx
--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
Oct 24 '07 #5

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

Similar topics

0
by: Amin Schoeib | last post by:
Hi, I am a Postgres newbie who worked until now with Oracle. Now I want to know if it is possible (when yes the how?) in Postgresql To set dynamically the Localization? For example in Oracle you...
0
by: Amin Schoeib | last post by:
Hi, I am a Postgres newbie who worked until now with Oracle. Now I want to know if it is possible (when yes the how?) in Postgresql To set dynamically the Localization? For example in Oracle you...
0
by: shapper | last post by:
Hello, Sometime ago I followed an article (I believe MSDN) related with localization in Asp.Net 2.0. To make pages localization I create a class named Localization: 1 Public Class...
3
by: Corey B | last post by:
I have an ASP.NET application that was built in ASP.NET v1.1. It has a SQL Server back end database. I have been asked to provide an estimate for the level of effort required to produce a Chinese...
3
by: Computer Guru | last post by:
I have a VB.NET 2005 application with several forms and a couple hundred "strings." I've been looking into all the localization improvements in VB.NET, and I can't seem to find anything that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.