Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 305937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:25:13+00:00 2026-05-12T07:25:13+00:00

I need to translate a Microsoft locale ID , such as 1033 (for US

  • 0

I need to translate a Microsoft locale ID, such as 1033 (for US English), into either an ISO 639 language code or directly into a Java Locale instance. (Edit: or even simply into the “Language – Country/Region” in Microsoft’s table.)

Is this possible, and what’s the easiest way? Preferably using only JDK standard libraries, of course, but if that’s not possible, with a 3rd party library.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:25:13+00:00Added an answer on May 12, 2026 at 7:25 am

    As it started to look like there is no ready Java solution to do this mapping, we took the ~20 minutes to roll something of our own, at least for now.

    We took the information from the horse’s mouth, i.e. http://msdn.microsoft.com/en-us/goglobal/bb964664.aspx, and copy-pasted it (through Excel) into a .properties file like this:

    1078 = Afrikaans - South Africa
    1052 = Albanian - Albania
    1118 = Amharic - Ethiopia
    1025 = Arabic - Saudi Arabia
    5121 = Arabic - Algeria 
    ...
    

    (You can download the file here if you have similar needs.)

    Then there’s a very simple class that reads the information from the .properties file into a map, and has a method for doing the conversion.

    Map<String, String> lcidToDescription;
    
    public String getDescription(String lcid) { ... }
    

    And yes, this doesn’t actually map to language code or Locale object (which is what I originally asked), but to Microsoft’s “Language – Country/Region” description. It turned out this was sufficient for our current need.

    Disclaimer: this really is a minimalistic, “dummy” way of doing it yourself in Java, and obviously keeping (and maintaining) a copy of the LCID mapping information in your own codebase is not very elegant. (On the other hand, neither would I want to include a huge library jar or do anything overly complicated just for this simple mapping.) So despite this answer, feel free to post more elegant solutions or existing libraries if you know of anything like that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to translate some python and java routines into pseudo code for my
I need to translate this code into c++ (microsoft c++ ATL/MFC)project. var ticks =
I need to translate a piece of C code into Delphi/Pascal code, however I'm
Can someone please translate this into English? The primary reference Microsoft.SQLServer.ManagedDTS, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91,
I need to translate programs written in a domain specific language into xml representation.
I have to use an Objective C code and translate it into Java for
I need to translate the below C# codes into Java, however, I could not
I need to translate the a carbon method into cocoa into and I am
We need to translate some of our UI to English, and the question arises:
I need your help to translate a query into pyes. This query is working

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.