Winstep Forums http://forums.winstep.net/phpBB2/ |
|
Language issues http://forums.winstep.net/phpBB2/viewtopic.php?f=2&t=4035 |
Page 1 of 2 |
Author: | skagon [ Sat Jan 29, 2011 6:04 am ] |
Post subject: | Language issues |
Hey mate. As I'm making progress with the translation, I've stumbled on what appears to be an issue with language settings. I just had this idea of looking at how my translations show, now that I've done more than half, and... ...well... you can see for yourself. The important element here is the system setting of "Language for non-Unicode programs" (Control Panel > Clock, Language and Region > Change keyboards or other input methods > Administrative > Language for non-Unicode programs). One of my systems has this set to "Greece" and another to "United States". I got screenshots, where you can see the results. Maybe it would be simpler just to compile Nexus as Unicode? Even the translator shows garbage in the US non-Unicode language (NUL) system. Right-click menus are again a mess in the US NUL system. Same goes for the pop-up balloons. Greek so far is perfect. The US NUL is consistently messy, HOWEVER in the prefs even the Greek NUL has problems in many fields. It is weird how some fields show perfectly fine, though... Easter egg: the exit button (leftmost in the bottom) remains in Greek (or in mess) even after I select "English". Any ideas? |
Author: | winstep [ Sat Jan 29, 2011 7:04 am ] |
Post subject: | Re: Language issues |
The problem is that the language in which Winstep applications are built-in is NOT Unicode-aware (ironically, it uses Unicode strings internally), but ANSII. This means language-specific 'character sets' are used. This is not a problem provided the system locale settings are correct (e.g.; you have the Greek version of Windows, the character set used for non-Unicode programs is automatically set to Greek by Windows). This is also how Winstep applications figure out which language to use by default on installation: they look at the current character set being used by Windows for non-unicode applications and match it with a language. It can only become a problem when you have, say, the English version of Windows (in which case the character set for non-unicode programs is set to English) but want the application to display Greek (non-western) characters. In that case you get the gibberish you saw. Still, it can be solved by going to the Regional Settings applent in the Windows Control Panel and telling Windows which language (character set) to use for non-unicode programs. The only limitation is that you cannot then have two non-unicode applications running at the same time displaying different languages (unless one of those languages is English, as ALL character sets have ALL the required characters for the English language). And that concludes my lesson in application localization for today. As for the Exit button, that was caught and fixed already, but thank you anyway. |
Author: | skagon [ Sat Jan 29, 2011 2:31 pm ] |
Post subject: | Re: Language issues |
Quick addition: I've just verified that : - buttons, checkboxes (text) and drop-down menus show Greek nicely - plain text, sliders and anything else, shows gibberish I don't know... are you using any libraries that don't pass or receive the locale properly? |
Author: | winstep [ Sat Jan 29, 2011 8:26 pm ] |
Post subject: | Re: Language issues |
Hmmm... That's weird. To make localization work, when a form (window) in the application is opened, all controls in it are first 'scanned' in a special routine: the text of the controls is translated and, at the same time, in what is a crucial step, the default charset of the control is changed to that of the system locale. This last step is required because the controls (labels, text boxes, check boxes, buttons, etc...) are ANSI and do not support Unicode either. Looks like, for some reason, the Label controls (what you call 'plain text') are missing this last crucial step. If this happens, the text displayed in them might use the wrong Charset, and you would get gibberish. The slider controls do not have text in them: the text you see next to them are actually separate Label controls. It is also necessary that the font used in those controls supports the extended/foreign characters. In this case, Tahoma is the font used in all the controls, and it does, as you can see in the check box controls, etc..., support Greek characters. What is weird is that, for instance, the Russians, which use Cyrillic characters, do not seem to have this problem. At least no Russian has ever complained about this. |
Author: | winstep [ Sat Jan 29, 2011 9:03 pm ] |
Post subject: | Re: Language issues |
skagon wrote: Crap, I just realised... I have to skin the right-click menu as well! Please make that skinnable too... Right-click menus are (optionally) skinnable if you are using Winstep Xtreme instead of Nexus or Nexus Ultimate. They'll use NextSTART menu skins. |
Author: | winstep [ Sat Jan 29, 2011 10:31 pm ] |
Post subject: | Re: Language issues |
Something else I noticed: if you look at the screenshots displaying results on the US system, the text is filled with '?' (question marks). However, that does not happen with the labels in the latest screenshots. Strange characters, yes, but no question marks. Hmmm... |
Author: | skagon [ Sun Jan 30, 2011 2:23 am ] | ||
Post subject: | Re: Language issues | ||
Ok, so, here's a little experiment I did. I thought about what you said, and I tried finding some correlation, but the story is, Greek codepages are many and the correspondence with character positions totally erratic. So... I was thinking... how do I get Windows to display Greek text, but override the codepage to be... something else? Answer: load the greek.ini file into Firefox, and override the character encoding. The first thing I tried: override encoding to "Western (ISO-8859-1)". Guess what: all the Greek text is shown *exactly* as Nexus shows it (on the Greek NUL system). So, it looks like these strings are shown using the default "Western" encoding. In the screenshot, I've highlighted the English text of the control shown, and I've moved the window right under the text, so you can see the match between the characters (gibberish).
|
Author: | winstep [ Sun Jan 30, 2011 3:05 am ] |
Post subject: | Re: Language issues |
Right, means the charset property for Labels is not being applied property on your system. But why only the labels? Can you please send me the Greek language file to the Winstep support address? Would like to try something here. |
Author: | skagon [ Sun Jan 30, 2011 3:57 am ] |
Post subject: | Re: Language issues |
The file's on its way. Be gentle with it. By the way, if you want to rig some test app quickly to try things, just let me know. |
Author: | skagon [ Sun Jan 30, 2011 4:43 am ] |
Post subject: | Re: Language issues |
winstep wrote: Right-click menus are (optionally) skinnable if you are using Winstep Xtreme instead of Nexus or Nexus Ultimate. They'll use NextSTART menu skins. I know that's not important right now (it's the little room in front of the plane where the pilots sit)... ...but why not Nexus too? Surely that can't be a selling point... [throws cue ] |
Author: | winstep [ Sun Jan 30, 2011 5:28 am ] |
Post subject: | Re: Language issues |
Menus are NextSTART's department. So, you want skinnable context menus, get Winstep Xtreme (which includes NextSTART. In fact, it includes everything). And don't call me Shirley. Ah, and regarding those Greek characters? Well, I forced the charset of every control to 161 (Greek) and guess what? Labels now display Greek characters, but all the rest doesn't - so exactly the opposite from you. Go figure. Sigh. Do you now understand why I told you I don't want to touch localization issues even with a 10 feet pole? |
Author: | winstep [ Sun Jan 30, 2011 8:46 am ] |
Post subject: | Re: Language issues |
Ok, let me show you something: As you can see, labels and other controls are correctly displaying Greek characters. I suspected as much. To accomplish this I downloaded, installed and run Microsoft's 'App Locale', which allows you to set the system locale for a legacy (i.e.; non-unicode) application without having to change this setting globally, which requires a reboot. For that application, it's the same as setting the 'language for non unicode programs' in the Control Panel but without forcing you to reboot Windows. This on a English version of Windows. What is your version of Windows? English as well, isn't it? I know it's not your fault, but I've wasted many hours chasing an issue which really isn't there (except, perhaps, on your system for some strange reason - maybe because of Hyperdesk, although I seriously doubt that?). I've also learned that simply setting the charset for fonts on forms (windows), text boxes and label controls will actually work without having to change the system locale in the Control Panel, but will not work (no idea why, was unable to find any information on this) for other types of controls (command buttons, check boxes, etc...). In effect, the exact opposite of what is happening to you. Either way, what I can deduce from this is that your Greek fellowmen will be able to benefit from your Greek translation (even if you won't). |
Author: | skagon [ Sun Jan 30, 2011 1:20 pm ] |
Post subject: | Re: Language issues |
Wow! Looks nice! Anyway, I think I've got another notebook somewhere around here, with Greek Windows 7 (yes, all of my systems are English Windows), and without HyperDesk, on which I can give it a go and see how it behaves. Actually, I can even make a test installation of any Windows 7 version you'd like, and see what happens. Anyway, I know that's not what you'd like to hear but, like Microsoft says, the best course of action would be to migrate to Unicode. That way, even I could see what a Russian Nexus looks like, with proper Cyrillic characters, by just clicking on the appropriate language. |
Author: | winstep [ Sun Jan 30, 2011 1:36 pm ] |
Post subject: | Re: Language issues |
I'll tell you a story: Netscape (remember them?) once thought it would be a good idea to re-do all their code from scratch. By the time they finished (several years later) IE was the new de-facto standard and the Netscape browser nothing more than a dim memory in the mind of most users. Microsoft would like everybody to migrate to .NET, but what they don't tell you is that you can't do this kind of stuff under it. It has to be done in pure Win32, not managed code. |
Page 1 of 2 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |