Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

[MBS] Get name of System language - OS X and Windows (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] Error generating PDF in web edition
Next thread: [MBS] QTExporter Question


Re: [MBS] PortAudio bug?   -   Garth Hjelte
  [MBS] Get name of System language - OS X and Windows   -   Mark Franken
   Re: [MBS] Get name of System language - OS X and Windows   -   Mark Franken
   Re: [MBS] Get name of System language - OS X and Windows   -   Christian Schmitz
   Re: [MBS] Get name of System language - OS X and Windows   -   Mark Franken
   Re: [MBS] Get name of System language - OS X and Windows   -   Glenn L. Austin

[MBS] Get name of System language - OS X and Windows
Date: 23.01.13 05:41 (Wed, 23 Jan 2013 15:41:25 +1100)
From: Mark Franken

Hi Christian,

Do you have a function to get the name of the currently selected language for OS X or Windows? I'm not familiar with setting this in Windows, but in OS X I'd like whatever language is at the top of the language list in the System Preferences, Language & Text, Language tab. I'd like to know if the system is setup for English or not.

Thanks,

Mark









_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Get name of System language - OS X and Windows
Date: 24.01.13 04:08 (Thu, 24 Jan 2013 14:08:47 +1100)
From: Mark Franken


On 23/01/2013, at 8:58 PM, Christian Schmitz wrote:

> This is possible:
>
> dim n as NSLocaleMBS = NSLocaleMBS.currentLocale
>
> MsgBox Join(n.preferredLanguages,EndOfLine)

Great that works for me.

Thanks

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Get name of System language - OS X and Windows
Date: 23.01.13 10:58 (Wed, 23 Jan 2013 10:58:49 +0100)
From: Christian Schmitz

Am 23.01.2013 um 05:41 schrieb Mark Franken <<email address removed>>:

>
> Hi Christian,
>
> Do you have a function to get the name of the currently selected language for OS X or Windows? I'm not familiar with setting this in Windows, but in OS X I'd like whatever language is at the top of the language list in the System Preferences, Language & Text, Language tab. I'd like to know if the system is setup for English or not.

This is possible:

dim n as NSLocaleMBS = NSLocaleMBS.currentLocale

MsgBox Join(n.preferredLanguages,EndOfLine)

Greetings
Christian

Re: [MBS] Get name of System language - OS X and Windows
Date: 23.01.13 08:32 (Wed, 23 Jan 2013 18:32:14 +1100)
From: Mark Franken

On 23/01/2013, at 4:25 PM, Glenn L. Austin wrote:
> Why not define a language-specific string that has a Default value of "NO" and and English value of "YES".
>
> Then just test the string for equal to "YES" -- if true, then you're running in English!

Hi Glenn,

Thanks for the idea. I've never localised any strings before so I checked out the LR.

I created a Dynamic constant as per the LR: String defaults to "NO", checked dynamic, clicked +, set to any platform, selected "English" and set this to "YES". However when I display a MsgBox on app startup it says "YES" when OS X is booted with it's language set to English or German. I've tried switching to German and restarted the OS X (all the finder strings change) but my app still displays English = "YES" on startup. Just checking is this dynamic constant meant to take the Language setting from the system or is it taking it from the build language setting of the app? My build language setting is set to Default.

Thanks,

Mark
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Get name of System language - OS X and Windows
Date: 23.01.13 06:25 (Tue, 22 Jan 2013 21:25:09 -0800)
From: Glenn L. Austin

On Jan 22, 2013, at 8:41 PM, Mark Franken <<email address removed>> wrote:

>
> Hi Christian,
>
> Do you have a function to get the name of the currently selected language for OS X or Windows? I'm not familiar with setting this in Windows, but in OS X I'd like whatever language is at the top of the language list in the System Preferences, Language & Text, Language tab. I'd like to know if the system is setup for English or not.

Why not define a language-specific string that has a Default value of "NO" and and English value of "YES".

Then just test the string for equal to "YES" -- if true, then you're running in English!