7

It is possible to change the locales used for Date for users in the Admin. For example, Ireland is

dd/mmy/yy

The US is

m/d/yyyy

Is there anywhere where I can get a list of all locales?

Thanks

More Than Five
  • 2,033
  • 19
  • 30

3 Answers3

6

Salesforce used to document their supported locales, but the list has been retired: http://login.salesforce.com/help/doc/en/admin_supported_locales.htm

You can still surface the supported locales by describing the User.LocaleSidKey field:

Schema.PicklistEntry[] pes = Schema.SObjectType.User.fields.LocaleSidKey.PicklistValues;

As of Winter '14 There are 186 locales:

sq
sq_AL
ar
ar_BH
ar_EG
ar_JO
ar_KW
ar_LB
ar_QA
ar_SA
ar_AE
hy
hy_AM
az_AZ
eu
eu_ES
be_BY
bn_BD
bs
bs_BA
bg
bg_BG
ca
ca_ES_EURO
ca_ES
zh
zh_CN_PINYIN
zh_CN_STROKE
zh_CN
zh_HK_STROKE
zh_HK
zh_MO
zh_SG
zh_TW_STROKE
zh_TW
hr
hr_HR
cs
cs_CZ
da
da_DK
nl
nl_BE
nl_NL
nl_SR
en_AU
en_BB
en_BM
en_CA
en_GH
en_IN
en_ID
en_IE_EURO
en_IE
en_MY
en_NZ
en_NG
en_PK
en_PH
en_SG
en_ZA
en_GB
en_US
et
et_EE
fi
fi_FI_EURO
fi_FI
fr
fr_BE
fr_CA
fr_FR_EURO
fr_FR
fr_LU
fr_MC
fr_CH
ka
ka_GE
de
de_AT_EURO
de_AT
de_DE_EURO
de_DE
de_LU_EURO
de_LU
de_CH
el
el_GR
iw
iw_IL
hi
hi_IN
hu
hu_HU
is
is_IS
in
in_ID
ga
ga_IE
it
it_IT
it_CH
ja
ja_JP
kk_KZ
km_KH
ky_KG
ko
ko_KR
lv
lv_LV
lt
lt_LT
lb
lb_LU
mk
mk_MK
ms
ms_BN
ms_MY
mt
mt_MT
sh_ME
no
no_NO
pl
pl_PL
pt
pt_AO
pt_BR
pt_PT
ro
ro_MD
ro_RO
rm
rm_CH
ru
ru_RU
sr
sr_BA
sh
sh_BA
sh_CS
sr_CS
sk
sk_SK
sl
sl_SI
es
es_AR
es_BO
es_CL
es_CO
es_CR
es_DO
es_EC
es_SV
es_GT
es_HN
es_MX
es_PA
es_PY
es_PE
es_PR
es_ES_EURO
es_ES
es_UY
es_VE
sv
sv_SE
tl
tl_PH
tg_TJ
th
th_TH
tr
tr_TR
uk
uk_UA
ur
ur_PK
vi
vi_VN
cy
cy_GB
Matt and Neil
  • 32,894
  • 7
  • 105
  • 186
5

To expand on user320's answer and code snippet, here's a more complete Apex class to retrieve a list of supported locales in your organization:

public class LocaleLister {

    // Empty constructor
    public LocaleLister() {} 

    // List the available locales
    public static string listAvailableLocales() {
        String localesList = '';

        Schema.PicklistEntry[] locales = Schema.SObjectType.User.fields.LocaleSidKey.PicklistValues;
        for (PicklistEntry locale : locales) {
            if(locale.isActive()) {
                localesList += locale.getValue() + ' -- ' + locale.getLabel() + '\n';
            }
        }

        return localesList;
    }

    // Property for use in Visualforce pages
    public String locales {
        get { return LocaleLister.listAvailableLocales(); }
    }
}

Use the static method to get the list as text, or use the class as a controller for a Visualforce page, like this:

<apex:page controller="LocaleLister" showHeader="false" standardStylesheets="false">

    <h1>Salesforce.com Available Locales</h1>

    <pre>
{!locales}
    </pre>

</apex:page>
Alderete
  • 411
  • 4
  • 7
2

The locale for each user can be set on the User record.

Here's the list of support locales: http://login.salesforce.com/help/doc/en/admin_supported_locales.htm

Guy Clairbois
  • 10,634
  • 31
  • 49