Member Controls

Developers > Localising PJSE
pljonesLink to postposted: Sun Apr 30, 2006 11:58 am
Avator for pljones

Member since:
 2005-04-02
From:
 London, UK
Posts:
 610
Hi,

I've started putting in place the means to translate PJSE (to match SimPe's capability).  In testing, I've hit a bit of a stumbling block.  .Net2 seems to think my Thread.CurrentThread.CurrentUICulture is "en-US" when I think it should be "en-GB".  Of course, I've no idea where .Net2 is getting its value from.  My PC is set up in Control Panel with a Location of "United Kingdom", so I'd expect that to "just work".

Anyone any clues?

Thanks!
quaxiLink to postposted: Sun Apr 30, 2006 2:56 pm
Avator for quaxi

Member since:
 2006-04-28
Posts:
 3154
Nope, as mine reads the culture correct as de-DE.

I would guess, that it should get this Value from your System settings.
quaxiLink to postposted: Wed May 10, 2006 7:33 pm
Avator for quaxi

Member since:
 2006-04-28
Posts:
 3154
Wait, i just read your post again, and you try to localize your project...

Why do you need the read the culture value for that. You can do that automatically.

Just go to a form, open the properties editor and look for the language Proberty of that form. Change it to th language you want to translate the FORM to.

When you change the location, size or Text properties of your controls on the form now, the changes will only affect the current language setting of that form.

If you change the language property back to the default, or another language, the Settings of the controls will update, reflecting the language change.
pljonesLink to postposted: Wed May 10, 2006 11:21 pm
Avator for pljones

Member since:
 2005-04-02
From:
 London, UK
Posts:
 610
I wasn't worried about forms.

Because of the verbose "parsed" output, I had (well, still have) a lot of hard-coded strings in my plugin.  I want to make these localisable as well as the forms.  Anyway, I tried putting in en-US and en versions of the .resx file and they get picked up, so I'll just have to live with not being able to get locale to en-GB, I guess.  /shrug/  (Quite why Microsoft thinks "United Kingdom" in location means a locale of en-US in .net2, I don't know.)
NecromanteLink to postposted: Mon Sep 18, 2006 2:34 pm
Avator for Necromante

Member since:
 2006-09-18
From:
 Russia
Posts:
 26

pljones wrote:
(Quite why Microsoft thinks "United Kingdom" in location means a locale of en-US in .net2, I don't know.)

couse 'uk' are already used. it's Ukraine. Ukrainian (Ukraine): ua-uk, English (United Kingdom): en-gb

TheoLink to postposted: Mon Sep 18, 2006 4:37 pm
Avator for Theo

Member since:
 2006-01-07
From:
 14.918246, -23.514862
Posts:
 75
The regional settings defined in the Control Panel are reflected in the Thread.CurrentCulture property and not in Thread.CurrentUICulture.

Maybe the CurrentUICulture refers to the windows instalation language, as my instalation is in english and the CurrentUICulture also displays "en-US"

A basic workaround is to assign the CurrentCulture to the CurrentUICulture, so that resource localization matches the user-defined settings:
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture


viewthread, 0, 0, Localising-PJSE