Get Locale country and language codes

I have checked the documentation, but nothing is jumping out
at me. Is there a function that returns the locale country and
language codes? GetLocale() returns the "locale name as it is
represented in ColdFusion":
ie:
English (US)
Spanish (Standard)
What I am looking for is the
ISO
codes
en US
es ES
I can get the information using getPageContext(), but just
wondered if I was overlooking a built-in CF function.

-==cfSearching==- wrote:
> The problem with the functions I have seen is that they
return
locale name
> as it is represented in ColdFusion (ie English (US)
). But what I am
> looking for the ISO language and country codes.
...hmm this didn't go thru on the 16th. let me try again.
that should only be for the "traditional" cf supported
locales (backwards
compatibility is always foremost in the cf team's minds), the
rest should be in
normal java style locale ID (th_TH, ar_AE, etc).
no, there's nothing built-in in cf for what you want. you'll
have to dip down
into java:
<cfscript>
localeObj=createObject("java","java.util.Locale");
locales=localeObj.getAvailableLocales();
writeOutput("<table border='1'>");
writeOutput("<tr align='center'><td
colspan='2'>Locale</td><td>Language</td><td>Country</td></tr>");
for (i=1; i LTE arrayLen(locales);i=i+1) {
thisLocale=locales
thisLanguage=thisLocale.getLanguage();
thisCountry=thisLocale.getCountry();
writeOutput("<td>#thisLocale.toString()#</td><td>#thisLocale.getDisplayName()#</td><td>#t hisLanguage#</td><td>#thisCountry#</td></tr>");
writeOutput("</table>");
</cfscript>
note that this snippet doesn't show variants (eg. th_TH_TH)
& shows language
only locales (en, fr, etc.), nor is it sorted in any order i
can recognize. also
keep in mind that what this shows depends on the server's JRE
version. if you
want a "better" source of locales, use the icu4j lib's
ULocale class. it's based
on the latest CLDR & contains way more locales (and they
actually tend to fix
locale bugs in your lifetime).

Similar Messages

  • MSN (home page) redirects to the wrong country and language

    Hello,
    I have a strange problem. I went to Mexico for vacation. While I was there, every time I open my IE, it would redirect me to the Mexican MSN. I assumed, this is normal for MSN redirects to the local (country and language) page. It redirected me to
    http://prodigy.msn.com/es-mx/?ocid=iehp page.
    Now, I am back home to US. For some reason, MSN is still Mexican. I have an option to change it when I click on the Options in the right top corner of the MSN page, but it does not remember this setting when I close and open my IE.
    My Language and Country in Control Panel are correct. Home page in IE did not change and it is
    http://go.microsoft.com/fwlink/p/?LinkId=255141 If I go to this link directly, it takes me to the US MSN page.
    Not sure what else to check. Anyone can help me with this?
    Thank you.
    Please “Vote As Helpful” and/or “Mark As Answer” if this post helped you.

    have an option to change it when I click on the Options in the right top corner of the MSN page, but it does not remember this setting when I close and open my IE.
    So, this sounds like more of an MSN issue than an IE one.  But perhaps you should try clearing Cookies at least for that site.  You can do that with the Developer Tools, Network tab. (F12, Ctrl-4)  Clear Cookies for this domain is the button
    that looks like a cookie with a bite out of it.  Unfortunately there is no keyboard shortcut for that option.
    Good luck
    Robert Aldwinckle

  • Problem with set-up: Blackberry ID- country and language

    Hello, I am setting up my Playbook tablet for the first time and have hit a snag on the third or fourth screen. I am supposed to enter my country and language for Blackberry ID, but I see only 'No country indicated' and I find no way to enter a country and language, as prompted. According to the tutorial, this screen should show a language option immediately. I went to get a Blackberry ID, through my e-mail address but it is obviously not 'connected' in any way (yet) to my Playbook tablet.
    I hope someone might help me with this and I will certainly appreciate said help! Must say the obvious, I am new to this forum, but I am sure I am posting my question in the right forum.
    Thanks a lot!  
    Solved!
    Go to Solution.

    No worries, It could have been that you lost connection. Doing this will make sure that you are connected. Sometimes you may need to delete the connection and try setting up again and then going further will display what you are looking for.
    Regards,
    Nick
    - If my response has helped you, please click "Options" beside my post and mark it as solved. Clicking the "thumbs up" icon near the bottom of my response would also be appreciated.

  • My phone does not show contact names for country and area code while having in coming calls. Although, I have endorsed the name with numbers. How do I the problem. My one is a iphone 3s device with updated os. Please text to help

    My iphone does not recognize saved contact number while having incoming calls due to country and area code as auto prefix. How do i fix the problem. How do i ensure that the phone recognize calls with and without the country and area code. Please text to help.

    1) Open the Phone and dial *228. This is a Verizon over-the-air programming number.
    2) When the system answer press 1 for "Program or activate your phone"
    3) Wait for the call to disconnect. You should get a prompt stating something like, "Settings updated."
    4) Open the Task Manager and kill the Phone, Message, and Contacts Applications
    5) Wait a few minutes (I waited 3 just to be extra safe)
    6) Open the Message App to verify the fix

  • The tablet didn't accept country and language selection

    when I start with my tablet , i have faced to problems:
    1- it didnt accept the language and country selection in the ID agreement page. when i select it goes back to none selected
    2- the divice is over heated at the back

    During the initial setup of the BlackBerry PlayBook tablet setup, the user is prompted to select a country for the BlackBerry ID agreement. When a country is selected the following error is displayed:
    Unable to display the BlackBerry ID Agreement.  Please select your country and language, then try again.
    If attempting to connect the BlackBerry PlayBook to a Wi-Fi Hotspot, the username and password must be entered to obtain internet connectivity.
    When the BlackBerry PlayBook tablet has successfully connected to a Wi-Fi HotSpot, the following Hotspot Setup button appears at the bottom left:
    Click on the Hotspot Setup button, and this will open a window to enter the username and password.
    For additional information on Wi-Fi setup, please refer to the following knowlage base article:
    KB26228 - Getting started with BlackBerry PlayBook tablet initial setup
    KB26096 - Troubleshooting Wi-Fi and networking on the BlackBerry PlayBook tablet
    The BlackBerry PlayBook tablet is running an unsupported software version.  Update the BlackBerry Tablet OS using BlackBerry Desktop Manager 6.0.2, only if the BlackBerry PlayBook tablet is running
    It might take up to tree hours to update the tablet software.  During that time, the BlackBerry PlayBook tablet should not be disconnected from the computer.
    1. Confirm the BlackBerry PlayBook tablet is running only 1.0.1.1309
        a.  When a succesful Wi-Fi connection is establish, click on the Diagnostic gear icon on the bottom right.
        b.  In the Diagnostics screen, select Device Information under Information Type
        c.  Confirm the SCM Version is 1.0.1.1309
        d.  If it is 1.0.1.1309, proceed to Step 2.  Do not continue if it is not version 1.0.1.1309.
    2. Connect the BlackBerry PlayBook tablet to a computer running BlackBerry Desktop Manager 6.0.2.
    3. On the home screen of the BlackBerry Desktop Software, click Update.
            To download an update, click Get Update.
            To view other available versions of the BlackBerry Ptablet OS, click View other versions.  If applicable, click another version.  Click Install.
    4. Select the Email me when new versions are available check box to receive an email when an updated version of BlackBerry Tablet OS is available.
    5. Click Install update.
    When a confirmation message that the update is complete is displayed, disconnect the BlackBerry PlayBook Tablet.
    A reset of the BlackBerry PlayBook tablet may be required to get the reload to begin. 
    hope this help!

  • IMessage on Mac: country and region code?

    Hi,
    The Message app in Mac OS it's not working correctly, and I think it's because of the country and region code.
    I can't send messages to the contact phone number (previously added to Contacts app) as I do on the iPhone, it says the number is not registered with iMessage. I have to manually type 5511 (my country and region code) before the phone number. I do not need to do this on the iPhone, all local phones have no code at all and are in the format ####-####.
    Everything else works fine, the messages are even synced in both devices, but as the Mac OS app sees the sender's number with country and region code, it does not match any of my contacts in the Contacts app.
    Is there any preference I need to set or any other way to resolve this?
    Thanks!

    HI,
    Actually they are two different apps  and the approaches are slightly different.
    The iOS version can check if the recipient is also iMessages compatible and will switch to SMS if Not.
    This means there are extra steps before iMessages are sent to the iMessages server for delivery.
    The Mac version can tell you the recipient is not using iMessages but does not switch to SMS meaning the action is Local to the device and not at Server level.
    As far as I can tell the iMessages server works on storing full international Numbers as an ID which is then linked to an Apple ID.
    Obviously the numbers can vary in the number of digits with some countries only having one leading + digit (i.e America is +1) and others have longer  (i.e. the UK is +44 and Brazil is +55)
    In the UK different carriers are separated in the next four digits a bit like an area code.
    I must admit that sometimes I select an Name and the choice for an iPhone Number in the Contacts part of adding a name to the "To" field and it tells me it does not like the number.
    Clicking and holding the red box at the pointed arrow end shows me the alternatives and I can uses the same number in an acceptable format.
    Part of this is what is "registered" as the number with the iMessages server compared to other places
    What people registered and what you have in your Contacts info may be the same but I would think the iMessages servers are expecting a minimum number of digits.
    9:02 PM      Saturday; January 5, 2013
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.2)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • VAT registration number in combination with country and company code

    Hi,
    Is there configuration where we can define the VAT registration number with combination of country and company code.
    thanx in advance

    Hi,
    Thanx for the reply.bt the issue is like we have a condition type zvat where condition table have the following fields departure country and destination country,The country of our company code is GB and we maintain a record for condition type zvat i.e GB (departure country) to GB (destination country) 17.5%.While creating a contract if vat is applicable we told user to maintain country GB in both the fieds i.e tax departure country and tax destination country in billing tab at header level of the contract .It is working fine for other company where  company code country is different then GB.But for this where company code  country is GB.An error occurs i.e.There is no vat registration number fot this comapny code XXXX for  country GB.
    Now how should i go about it?

  • My iphone app store is downloading apps in french but my language is portuguese . I changed country and language  even though they were  already in portuguese and brazil. Don't konw what to do anymore . I bought some apps and they all are in french .

    Hi , my iphone app store is downloading apps in french instead of portuguese . I checked my country and language in settings and they are right . Don't know what to do anymore. I even bought some apps and they are also in french .

    Follow this link for the Bionic ICS user guide; if you have issues/questions, you may want to do a search on this forum as there are already several threads/remedies.  If a search doesn't answer your question, submit a post.
    https://community.verizonwireless.com/message/893011#893011

  • ISA : Dateformat depending on Country and language

    Hi there...
    I have installed ISA for R/3 and setup several shops for different conutries with corresponding languages.
    When I log on to the different shops I get different date formats like 21-04-2005 and 21.04.2005 etc.
    Where is this managed ?
    First I thought that is was depending on my SAP connecting user but then it couldn’t be different from shop to shop.
    I have searched tough the language resources and other places to find a solution but without any luck.
    Can anybody tell me the solution ?
    Best regards
    Lars Henrik Andersen

    Hi,
    you have to go for a user exit.
    USEREXIT_SAVE_DOCUMENT_PREPARE. write the logic with the user name=A should check the customer country and region if it is allowe d then the sales order can be created else give a error message
    regards
    Prashanth

  • HT204088 Inspite of submitting all requiredFields I am not getting purchase History and Security code for redeeming.I have clicked for purhase of Sri Sri Shankar's Rudra Album but unable to get it loaded on my I pod  What do I do ? Reply to me by Laila no

    Dear Customer Care I Tune,
      I have been trying to down load "Rudra"Album of Sri Sri Ravi Shankar, A religious & Spiritual Hymn. from I tune store. The price was shown as Rs 120/= I clicked on buy and filled the details of my debit card (ICICI Bank India)which created account but I could not fill up code for redeeming or security code being asked for ,with the result the my purchse is not getting authorised (I presume.)I am unable to get the Music on my I pod. To my  Earlier complaint I got Reply under follw up #272091438 from your customer care miss Laila. I was asked to action as suggested in the link. But inspite of following the insructions as suggested in the link I could not get Purchse details and order number as envisaged in the instructions. Can  I expect some working suggestins and advice .
      Anant Pashilkar
    Presenlty I am at Austine Texas
    <Personal Information Edited By Host>

    Most of the people on these forums, including myself, are fellow users - you are not talking to iTunes Support here. I've asked the hosts to remove your email address and phone number from your post.
    If you are currently in Texas in the US then you won't be able to buy from the Indian iTunes store - you need to be within a country to use its store, so to use the Indian store you will need to be in India.
    In terms of the redeem code that you mentioned, entering an iTunes gift card is optional and they are country-specific and they are not available in all countries - I don't think that are available in India, so I don't think that you could fill it in anyway. For the bank card, i don't think that debit cards are now accepted as a valid payment in the store, there have been a number of posts recently about them being declined, and they are not listed on this page.

  • Getting Business place and section code grey in f-44

    Hi gurus
    We are clearing the vendor in t code f-44 but business place and section code are coming grey in posting key 27 and 37
    Please resolve how to get the field edited.
    REgards

    HI
    Check the field status of the account group of the vendor account. Besides, check the field status of the PK 27 and 37.
    regards,
    satya

  • Code country and ISO Code

    Hi guys,
    I'm defining a new country into the step 'Define countries in R/3 system' : this country is 'Serbia-Montenegro' but when I click on 'New entries' and I'm seeking for the code country I don't find it..and the same thing it happens for the ISO code because I don't find the step into customizing where I can enter the ISO code which I after should select (CS) while I enter the severals fields into 'Define countries in R/3 system' in customizing...How can I do?Thanks in advance bye
    Maximilian

    Hi,
    Codes used in Foreign Trade Statistics (Note 851943) and ISO codes (Note 693152 / 1932513) are quite often identical but not always. This is the case for Serbia and Montenegro.
    o  Country XM
        Alternative key: 097
        Name: Montenegro
        ISO code: XM
    o  Country XS
        Alternative key: 098
        Name: Serbia
        ISO code: XS
    Please assign points if it useful.
    Regards
    Ravinagh Boni

  • Country and ISO code

    Hi
    There are 5 countries(eg, BL,UN,EU) maintiained in the country list table (V_T005) with no ISO code associated with it. We are integrating SAP and Ldap and since these countries have no ISO code associated with it the Idoc generated are having errors.
    Is it ok if we delete these country field in SAP. Will it have any impact on any other data.
    Valuable inputs from HR consutlants are inivited.
    Regards
    Sasha.

    Dear Sasha,
    Please check out note 1164216 :
    << In a customer system the country table can be adjusted specifically for the customer. The customer entries are not
    overwritten by an SAP upgrade. >>
    And also you will find in this note an attachment with all the iso code supported by SAP. You will then have to create these entries.
    Hope it helps,
    Christine

  • Dynamic Dropdown for Country can Phone Code

    Hi,
    Can anyone show me how to create a Dynamic List for Country and Phone Code. Select a country from dropdown menu and it reloads the page to show the coutry phone code in a text field.
    Example:
    -- It shows a list of country
    -- When a country is selected, it populate the selected country phone code to a text box on the same page.
    Let say, Choose UK country and it auto populate the Phone Code "44" to the text field box on the same page.
    Please advice.
    Thank you

    I exactly know the solution you need.
    But please dont forget to award me the 4 duke dollars if you are satisfied with my solution.
    The solution:
    <select size="1" name="country" onChange="myFunc()">
    <option value="">Please select ..</option>
    <option value="0001$91">India</option>
    <option value="0002$81">Japan</option>
    <option value="0003$44">UK</option>
    </select>
    <p><input type="text" name="myTextField" size="5"></p>
    <script>
    function myFunc()
    var ind =document.forms[0].country.selectedIndex;
    if(ind!= -1)
    var phoneCd = document.forms[0].country[ind].value.substring(5);
    alert(phoneCd );
         document.forms[0].myTextField.value=phoneCd
    else
    document.forms[0].myTextField.value="";
    //alert("my 4 duke dollars pls ;-)");
    </script>
    As you can see in the above dropdown menu "country" that I have defined the phone code in the value after the "$" symbol.
    Simply substring the portion after the $ symbol and you get the phone code.
    Lemme know if this helps ..
    -Rohit
    Message was edited by:
    RohitKumar

  • Language Codes

    Hello All,
    I'm trying to burn an image of a DVD I've created and I keep getting the error message "Language codes for 'English' and 'English-2' must differ"...
    Is there any way around this or will I have to rebuild my entire project?
    Thanks...

    You've added another Language to the project. If you check the Outline Tab you'll see English & English-2. If you delete (or change) English-2 the error will go,
    -Jake

Maybe you are looking for

  • Mini Display Cable 27" Cinema Display & rMac Book Pro

    Hi is there any extentions or convertors where i can connect my 27" Cenima Display which have a mini display cable not thunder bolt to Mac Book Pro with retina Display ? Kind Regards

  • Stacks weird visual bug

    Hi, I'm running Leopard 10.5.3 on a 1Ghz iMac G4 which came with a GeForce4 MX graphics card. I've been using stacks from the beginning (and loving it) but every time I use it, a weird visual bug is triggered; basically white semi-transparent rectang

  • SRM 7.0 Invoice Rejection in SRM Portal

    Hi, We have come across a scenario where an approver is unable to reject an invoice in their tasks queue. An error message of "/sapsrm/cx_pdo_error Reason for rejection is mandatory" appears However, when they reject a Shopping Cart for example, it w

  • Pays to read the instructions . . . .

    After a couple failures to install, and a replacement disc that failed to install, I found, in the installation instructions, the line about removing all your peripherals. So, I unplugged my printer, my external hard drives and my BamBoo pad, guess w

  • Mini DVD to iMovie

    Bengt posted the following about one month ago in response to a question asking how to get material from a mini DVD to iMovie. "I do: • Connect my Camera to a Stand alone DVD-player via the analog cable supported with the Camera plus a RCA-SCART conv