Solved

Regional and Language Options

Posted on 2004-10-22
179 Views
Last Modified: 2010-04-05
Hello,

How could I get the Language of the PC like this,

English PC, Return "UK"
English PC (US), Return "US"
French PC, Return "FR"
etc...

Thanks.
0
Question by:-Karamja-
    2 Comments
     
    LVL 17

    Accepted Solution

    by:
    Hi,

    Try this one:

    function GetUserLangID: string;
    var
      i: integer;
      wlcid: LCID;
    begin
      result := '';
      wlcid := GetUserDefaultLCID; // or use GetSystemDefaultLCID; for default system language
      for i := 0 to Languages.Count - 1 do
        if Languages.LocaleID[i] = wlcid then result := Languages.Ext[i];
    end;

    It returns the three letter ID (not two). Perhaps there is a better way.

    Regards, Geo
    0
     
    LVL 2

    Author Comment

    by:-Karamja-
    Thank you. :)
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
    Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
    In this Experts Exchange video Micro Tutorial, I'm going to show how small business owners who use Google Apps can save money by setting up what is called a catch-all email address in their Gmail accounts. By using the catch-all feature, small busin…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    933 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

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now