?
Solved

UNICODE SUPPORT IN APPLICATIONS??????

Posted on 1999-11-15
8
Medium Priority
?
165 Views
Last Modified: 2013-11-20
I want to support different languages for my application, I would like to know what is the best way to do it.

1. How is it possible to support the Resource files.

2. What are the efforts to be put into giving this option.

3. How much more coding effort has to be taken into consideration.

I want an application which has to have all Japanese Text ( meaningful to people of Japan ) when it runs in Japan and when it is back to the a particular country , it has to change its resources.

Hoping for some real good explanations.
0
Comment
Question by:nv3prasad
8 Comments
 
LVL 23

Expert Comment

by:chensu
ID: 2209119
Developing International Software For Windows 95 and Windows NT
http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/books/devintl/s24aa.htm
0
 
LVL 11

Expert Comment

by:mikeblas
ID: 2209598
Just mark each resource with the language it represents. Then, you can have it automatically resolved at runtime by the OS.

See the LANGLOAD.ZIP sample at http://www.nwlink.com/~mikeblas/samples/ for a simple example. (Some day, all of my samples will move to http://www.mooseboy.com/ )

If you code your app for Unicode, there's really little else to worry about--except for testing.

..B ekiM
0
 
LVL 1

Author Comment

by:nv3prasad
ID: 2209672
It is difficult if I want to support 100! languages, can you suggest me something better.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 11

Expert Comment

by:mikeblas
ID: 2209873
Windows directly provides nothing better.

If you want, you can make a DLL that holds each language and write your code to load resources from the DLL instead of directly from your *.EXE image.

To me, that seems harder--though, at runtime, it's probably more efficient. What, specifically, do you find "difficult"? If I can't tell why you think my suggestion is flawed, I'm ill-equipped to offer a remedy more suitable to you.

..B ekiM
0
 
LVL 1

Expert Comment

by:azami
ID: 2209941
There is no one easy answer, but there are several resources (magazine articles etc) that can help.  MS Developer Library has several very good ones.

Generally, you need to do three things:

1 - separate user interface, especially strings, COMPLETELY from your code.  This is easy to do on a new project if you are diligent, but can be quite heinous if you're converting legacy code.

2 - Use generic text representations in code, so that you have no dependencies on whether code is ASCII, UNICODE, or MBCS.  The Windows APIs (actually, header macros) let you do this; look for the t- versions of string functions.  Also, MFC CString is completely compatible and hides all of this from you - very handy.  As with 1, these are easy to do in new code, but absolutely no fun to retrofit onto legacy code.

3 - Now you just need to provide the different user interfaces (in a manner consistent with how you achieved part 1, above), and the mechanisms for switching between them.

Putting different language resources in DLLs, as described by mikeblas, is a fairly common way of doing this; at run time you can load resources from any DLL.  Whoever is doing the translation just needs to produce a DLL with the right resources and resource IDs.

More "modern" is using Microsoft's Message Compiler to compile your message strings into binary resources.  This is fairly complex, I've used them and I'm not even completely sure I know how it all works.  There are some API functions to automatically get and format these strings, based on locale (which can be passed by the caller, or gotten from the user's OS preferences).  The big advantage I can see to this is that you can integrate with the operating system, so that you are "automatically" in the user's preferred language without any additional configuration for your program.  In a multi-user multi-lingual environment, this is very helpful.

If you're having trouble finding help or MS Dev Library articles about the message compiler, look for how to use the NT event log, and possibly NT Services - that was the direction I found it.

I apologize for being so vague about references, but I don't have a development environment in front of me so that's all I can do.  If you have trouble finding the info, let me know and I will see if I can find more concrete references.

Good luck!
-Matthew
0
 
LVL 11

Expert Comment

by:mikeblas
ID: 2210217
No real need to use the message compiler, as string tables can achieve the same result. Message table strings are loadable without intializing the exeutable image they're stored in, and that can be a benefit. They're also a little more efficient than string resources.

..B ekiM
0
 
LVL 1

Author Comment

by:nv3prasad
ID: 2212323
Okay Mike, I am going to give you the points, since you showed me some light at the end of the tunnel. submit this as your answer.

0
 
LVL 11

Accepted Solution

by:
mikeblas earned 200 total points
ID: 2213139
Swell.

..B ekiM
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…
Suggested Courses

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question