[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


Regional and Language Options

Posted on 2004-10-22
Medium Priority
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-
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 17

Accepted Solution

geobul earned 1000 total points
ID: 12380316

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

Author Comment

ID: 12380387
Thank you. :)

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

650 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