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

x
?
Solved

Regional and Language Options

Posted on 2004-10-22
2
Medium Priority
?
181 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
Comment
Question by:-Karamja-
[X]
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
2 Comments
 
LVL 17

Accepted Solution

by:
geobul earned 1000 total points
ID: 12380316
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-
ID: 12380387
Thank you. :)
0

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