Regional and Language Options

Posted on 2004-10-22
Last Modified: 2010-04-05

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

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

Question by:-Karamja-
    LVL 17

    Accepted Solution


    Try this one:

    function GetUserLangID: string;
      i: integer;
      wlcid: LCID;
      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];

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

    Regards, Geo
    LVL 2

    Author Comment

    Thank you. :)

    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