 |
|
 |
Thanks. it works good.
Daniel
|
|
|
|
 |
|
 |
Will your application support japanese stirngs. If so How to create a japnese string dll.
When I tried the approach described, When I coping and pasting the stirngs I am getting ????? in stringtable in the japanese dll project .
Thanks,
Vamsee
|
|
|
|
 |
|
 |
Hi,
Your approach is nice.
Let me ask one question this point of time! Would your application support other literals apart from english alphabets.
If so, How ?
I tried copying chinese strings into string table but it is copied as some ???.??? like sometime it is stored as boxes ( ascii character )
Kindly tell me if i am wrong!
Thanks a lot!
Thanks a lot
|
|
|
|
 |
|
 |
Save the XML as UTF and compile your software as Unicode and it should support chinese or japanese.
|
|
|
|
 |
|
|
 |
|
 |
Hi,
although your code looks very smart and I'm convinced it works in most cases, I bet there are some (or a lot of?) cases you just oversaw or didn't even think on them.
I had the same problem quite a long time ago and did a research on the web on existing tools. I was afraid, most of them where quite expensive and disgned for translators to use, not for developers. Finally, I found some usable tools and decided to use Inlocate (formerly known as RapidTranslation). I'm using it since version 3.5 and I'm really satisfied (ok, version 4 was ... awful, but the current version is great again!)
It offers all the features you mentioned and even some more, like runtime switching for exmple, which might be interesting for some guys.
Although it's a professional tool, they offer (at least, they did with version 3.5) a "developers program", meaning that share- and freeware developers could receive a free version. Don't know, if this offer is still available...
Just my 2 pence - I'm using it and it fulfills my needs.
Kind regards,
- The "Localizer" -
|
|
|
|
 |
|
 |
Hi !
Great, your code works fine. But I have one big problem: I cannot copy the source string table of my application to the new language library project. It seems the clipboard function does not support that. How did you solved that problem ?
I work with VC++ 6 under XP Prof. Ok, last chance is to type in the entries by hands. but what should I do if applications string table is very huge ?
Thanks,
-stf
|
|
|
|
 |
|
 |
This is one of the strange unwanted features of VC 6. You can't copy stringtables from one instance of VS to another instance of VS.
So, this is what you should do:
1) Open old project
2) Copy string table
3) Close old project
4) Open new project
5) Past string table
Then it should work!
Best regards,
-----
Geert
Need an advanced auto-update feature for your software? Try Updater, it's free!
Visit my website: www.gvhsoftware.org
|
|
|
|
 |
|
 |
Ok, it works. Thanks.
In your example "Dutch" the string table is namend in the resource-tree-view as "String Table [Dutch(Netherlands)]" and in example "Application" as "[English(USA)]".
How and where do you set that ?
But it works also without these settings.
Bye
-jack
|
|
|
|
 |
|
 |
You can set the language of every resource item.
Simply right-click on the resource item.
-----
Geert
Need an advanced auto-update feature for your software? Try Updater, it's free!
Visit my website: www.gvhsoftware.org
|
|
|
|
 |
|
 |
Good Article.
I have a small doubt regarding Globalization/Localization. Hope you can help me out.
I have a web form application where i need to provide more than 50 different localized resource supports. Apart from this, my application supports rich use of stored data (Sql Server Database) and obviously have few list of Listing controls (Repeater , Grid etc).
My requirement comes like this,
a) I need to provide full localized language support in all data which is displaying in each and every page. Regardless of, the name of controls, content of controls etc. To be concise, which ever text that i am displaying through page, need to be localized based on user selected language.
b) Each and every setup needs to contain all supported languages. So user can switch and view content of site in different language.
I stuck in,
1) I am not sure how to localize stored data in database.
2) How will I give or from where i generate localized information for all supported language.
It would be grate if you can help me out through your valid comments.
Sreejith Nair
[ My Articles ]
|
|
|
|
 |
|
 |
Hi,
This article covers the translation of strings in an application. What you need, is much more. You want different screens for every language.
This simple means you have to copy the complete resource dll to make it local. Microsoft has some greate articles about it.
About the database. I should not translate items in a database. The database is the document. The application around the document can change to the user data, but I think the document should stay the same. Because what if a language is added after a few months? In that case, your database does not contain valid data anymore.
Best regards,
Geert
Want to spread the newest version of your software automatically for free? Use Updater!
Visit my website: www.gvhsoftware.org
|
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Sorry, but I would not recommend your article for anyone in need to incorporate multilingual support in his/her application.
First of all, strings are not the only thing to take care of. You must take care about calendar, time, currency, float number format in strings, national preferences in colors, control size and captions, etc.
Part of multilingual support should reside in an app itself (use Unicode, local aware date/time functions, etc.)
The other part - GUI layout, colors, etc, - should be in a resource dll.
All this is described in great details on MSDN under title 'Localization'.
geoyar
|
|
|
|
 |
|
 |
As Geert said in his introduction he only needed his "strings" to be in more than one language.
"What I really needed were simple .h and .cpp files which are able to load a language DLL and extract the strings I need."
I think this article helps everyone who is looking for information on how to do this in a simple and correct way.
Great job Geert!
@geoyar : Not flame intended.
|
|
|
|
 |
|
 |
If you are using MFC applicaiton, with or without extension DLL, I believe
Multiple language support for MFC applications with extension DLL[^] is easier. Only do the code changes in "Application Code Changes" and "DLL Code Changes", then you are done. Even for future new languages.
Simple is beauty.
---
Herbert Yu
Are you sure the speed of computer industry is proper? Are you sure the software you released is a bug free one?
|
|
|
|
 |
|
|
 |
|
 |
How to change menu, icons, toolbars etc. this way e.g. in MDI application ? Don't forget, that not all icons and pictures have the same meening in different countries. I use multiple dlls as well, but with all resources and I change them by calling LoadLibrary and AfxSetResourceHandle.
Fredy "KRUGER" Pumpicka
|
|
|
|
 |
|
 |
On my way ..I'm using the below code..
-----
FreeLibrary(AfxGetResourceHandle());
HINSTANCE dll = LoadLibrary("chinese.dll");
AfxSetResourceHandle(dll);
// delete last menu
SetMenu(NULL);
::DestroyMenu(m_hMenuDefault);
// create new menu
CMenu menu;
menu.LoadMenu(IDR_MAINFRAME);
SetMenu(&menu);
m_hMenuDefault = menu.GetSafeHmenu();
|
|
|
|
 |
|
 |
Hello Geert. Let me to make some considerations. Often who executes the translation is not a programmer. Above all when the application is much vertical one and therefore make use of terms or expressions many techniques. To the subject that it will execute the translation is necessary to transmit a list of the terms to translate. The same one will give back an other list in which, to flank of the terms in the native language they are indicates the same ones translated.
If it could Be used rows external as dictionary of the terms the suguenti advantages could be obtained:
1) the translator could verify in real Time the result of its translation
2) would not be necessary to predispose to the inside of the application of numerous string tables.
3) In every moment he could be added new rows of dictionary without having to take part in the application.
I have realized one solution of this type. Let me know if are intrested int.
EzioXia
P.s.
Sorry for my bad english
|
|
|
|
 |
|
 |
Hi EzioXia,
This is indeed a good approach. What is possible is add the values to a XML file. However, sometimes you don't want the users to be able to edit the text.
I received a mail last week about another approach: using an access database.
I am interested in your approach too. If it is ok, I can add it to this article (of course with references to you). Then the user can choose between 3 different types of translating applications:
1) Dll's
2) XML (dictionary files)
3) Access database
I want the class to support all of these solutions, which will make it very useful. However, it must be done without using MFC, so I have to check how I can communicate with an access database without using MFC.
Best regards,
Geert
Want to spread the newest version of your software automatically? Use Updater!
Visit my website: http://geert.yoki.org
|
|
|
|
 |
|
 |
One problem with translating resources (mostly strings) from one language to another is the length of the displayed string. You most times have to resize the dialogs, forms, static texts, etc. to fit the translated text.
One small example of what I am saying, is say you have a dialog/form with a button that has the following text "Save As...", and you want to translate it to the greek text "Αποθήκευση ως...". You cannot only change the text but also stretch and possibly rearrange the button to fit the additional 6 characters. Without this it would result to parts of the string been hidden or overlap other controls on the dialog/form.
These kind of problems can be solved easily only using dlls. I suppose other ways are more difficult to implement or require more work for both the programmers and the translators.
Sorry for my poor english.
...Plug & Pray...
|
|
|
|
 |
|
 |
That is absolutely right!
For simple translations, you can use text files or xml files or things like that. But when you are going to translate to so many different applications, you need to change the size of the text boxes as well.
Therefore, I am going to implement some functions that can load toolbars and dialogs. However, I have to check if this is not coming too close to existing functions because then it would be a waste of time.
Best regards,
Geert
Want to spread the newest version of your software automatically? Use Updater!
Visit my website: http://geert.yoki.org
|
|
|
|
 |
|
 |
Here is another approach:
Multiple language support for MFC applications with extension DLL[^]
This is DLL approach. Translater using only *.rc and res\*.* file to make resource-only DLL file for a new language.
Only problem with that approach, you cannot change language on-the-fly, you have to exit your application and launch it again.
I think, personally, for web applicaiton, text file, incluing xml file may be better. For Windows application, language resource-only DLL is a better direction.
---
Herbert Yu
Are you sure the speed of computer industry is proper? Are you sure the software you released is a bug free one?
|
|
|
|
 |