Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [locale]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
23 views

Change the locale of Quote PDF

We have a problem in my org related to the locale and the creation of the Quote PDF. We have 2 offices ("Europe" and "America") for the Quote object, specified in the Office (...
user avatar
6 votes
1 answer
173 views

How and when should I test and adapt my Apex code to support ICU?

Salesforce adopted a new set of locale formats in Winter ’20 called ICU. When and how should I adapt my Apex code to support it?
user avatar
  • 2,148
0 votes
1 answer
71 views

hour() and date() functions are returning wrong values

I am trying to get the hour and date of the user's local timezone by using the below code. now = Datetime.now(); offset = UserInfo.getTimezone().getOffset(now); local = now.addSeconds(offset/1000); ...
user avatar
-1 votes
1 answer
53 views

Illegal assignment from List<User> to List<User>

I am trying to get the locales in use in my org and a user count for each locale to prepare for the spring update 22. However I am unable to run this SOQL to get this list. I have looked for other ...
user avatar
2 votes
0 answers
32 views

Aura component and LWC are not supporting Nepal locale

I have a requirement where I need to show date in Nepal locale in both Lightning Web and Aura components. This shows the date in, for example - २०२१/२/१७ format in Salesforce but on LWC and Aura, it ...
user avatar
  • 41
3 votes
1 answer
298 views

LWC locale does not match Apex version

When I utilize the following in my LWC component: import USER_LOCALE from '@salesforce/i18n/locale'; I get this back: en-US However, when I run the following in Apex: UserInfo.getLanguage() I get ...
user avatar
0 votes
1 answer
78 views

Sorting results different for products in Salesforce

We are facing a weird issue in the results that are sorted by name for products. Scenario 1: User 1 opens the VF page which shows a list of products-sorted by name. They appear in the order with ...
user avatar
1 vote
1 answer
360 views

Format decimal according to locale, but with fixed number of decimal places

There were many question around the topic of formatting decimals according to user's locale and rounding decimals, but I haven't seen the one that actually fits my case, so here I go. I am creating ...
user avatar
  • 694
0 votes
2 answers
226 views

Locale Support for Canadian Short Codes

According to the following Marketing Cloud Valid Locales Documentation, there seems to be no support for the english Canadian locale, only for the french Canadian. Unsupported Locale: English (...
user avatar
0 votes
2 answers
738 views

How to find first day of the week by locale?

I have a LWC that displays a calendar, which calls to APEX and the class returns all the data needed to fill the calendar. By default, the data is returned where Sunday is the first day of the week. ...
user avatar
1 vote
0 answers
391 views

Formatting currencies in different locales (DE, EN, ES, FR & PT) in quote

My company is dealing with customers all around the world. We use 5 languages (English being the main): DE, EN, ES, FR & PT. We wanted to send the quotes with localized amounts to our customers ...
user avatar
2 votes
0 answers
100 views

Current user's locale in ProcessBuilder

I am trying to access the Locale field of the running user in Process Builder. The field is not available from the field list. I have also tried to access the field in the following ways: $User....
user avatar
  • 61
0 votes
0 answers
154 views

Get LanguageLocaleKey based on timezone ID

I have a custom object called Machine__c and i have a custom picklist field in it called Time_Zone__c. This Time_Zone__c field has the same picklist values as the Standard User object timezone field. ...
user avatar
  • 91
15 votes
1 answer
423 views

Is Salesforce SOQL GROUP BY case sensitive for different locales?

Lets say I have records with values like 'TEST DATA' and 'test data' in some field. When I run SOQL (in Developer Console or from Apex) by user with EN locale, it arranges records with 'TEST DATA' and ...
user avatar
1 vote
1 answer
141 views

Translations for multiple locales/dialects

We're developing a managed package that uses the translation workbench to provide translations. We'd like to support multiple English translations so that users with a different locale from En-US can ...
user avatar
  • 11
0 votes
1 answer
216 views

How to override user's locale for toStartOfWeek() method, so that system should always return Sunday date as week start date?

Date currentDate = System.today(); System.debug('Start of week = '+currentDate.toStartOfWeek()); For English (United States) locale System.debug will display Sunday date as Start of week. And for ...
user avatar
1 vote
0 answers
333 views

Site with Lightning Component breaks User Locale

I am trying to include a Lightning Component in a Visualforce Page that is accessed via Sites. When previewing to page in the sandbox, it works just as expected, but when accessed through the Site, ...
user avatar
4 votes
1 answer
234 views

Round Decimal and .format() it into a localized output String with more than 3 decimal places

Until today I was very happy with this utility method public static string roundNumber(decimal d, integer precision) { if(d == null) return ''; string separator = (1.01).format().substring(1,...
user avatar
  • 33.6k
5 votes
1 answer
2k views

Getting the currency symbol in lightning JS

I am using multiple currencies in my project and I have the currency ISO code. But the problem is, I want to get the symbol for currencies other than user locale. Is there any solution available for ...
user avatar
1 vote
1 answer
305 views

The $Locale global value provider returns wrong datetimeFormat value

I noticed that lightning have some problem with datetime format. Seems like issue with $Locale.dateTimeFormat that returns wrong value. I set-up my Salesforce org User locale settings to English(...
user avatar
  • 635
9 votes
5 answers
29k views

Lightning:input type="date": how to change the date fomat - Summer'18

I'm trying to change date format of this component but I dont find any attribute (like ui:inputDate has) to change the date format. <lightning:input type="date" name="input8" label="Dates" value="...
user avatar
1 vote
0 answers
102 views

How can lightning:inputField support human inputs of "10k" , how to make it support locale and how to make it consistent to other inputs?

I have a the following markup <aura:iteration items="{!v.Items}" var="item"> <lightning:recordEditForm recordId="{!item.Id}" objectApiName="OrderItem"> ...
user avatar
  • 33.6k
2 votes
1 answer
1k views

Formula fields to display Current time based on Company Information

Formula field to display current time based on the Company's default time zone, does anybody have the idea how to achieve this For User's timeZone current time used the NOW() - but don't know how to ...
user avatar
  • 541
1 vote
1 answer
1k views

How to get current user date/time format in apex, e.g. MM/dd/YYYY hh:mm:ss a z

We need to figure out current user date/time format in apex code to send it to our mobile app in order to display data in same way as it is in Salesforce itself. In other words, it's about getting ...
user avatar
  • 2,713
-1 votes
1 answer
519 views

Dateformat based on user locale [closed]

I am using aljs library to show datepicker.I need to format the selected date as per the date format of current user locale using moment.js moment(selectedDate).format(dateFormat) But I need all the ...
user avatar
0 votes
1 answer
412 views

How to replicate NumberFormat based on locale in salesforce

I want to show currency on VF page in different formats based on locale used on the template. NumberFormat class is available in Java to achieve this but in apex is there any way to achieve this. ...
user avatar
2 votes
1 answer
2k views

Locale language in lightning community

In a lightning component, I am currently using $Locale.language to get the users language locale, however, I am also considering to use navigator.language The NavigatorLanguage.language read-only ...
user avatar
  • 19.2k
4 votes
1 answer
1k views

How to change the UserInfo.getDefaultCurrency value in a test?

I am trying to test some code that uses UserInfo.getDefaultCurrency() but can't figure out how to control that value in a test. For example this doesn't work: User u = new User(Id = UserInfo....
user avatar
  • 129k
2 votes
3 answers
20k views

Relative Date Value (THIS WEEK,NEXT WEEK,LAST WEEK)

I have below filter in List view for my custom object and client's locale is US English. Scheduled Date equals THIS WEEK List view retrieves all records with scheduled date from Sunday to Saturday....
user avatar
  • 13.3k
1 vote
1 answer
2k views

Where i need to change the format of date and currency for german locale

I have created one quote (standard object) and that quote has product unitPrice and created date I am playing with that quote with two different users 1. BOB and 2. Alice (both have same role and ...
user avatar
0 votes
1 answer
267 views

Visualforce page language based on the OS language

Is there a way to use the Custom Lable translations on the Visualforce page for the public sites? I have one user - Site User, which has set the language to English, but in reality, the user visiting ...
user avatar
  • 441
1 vote
2 answers
577 views

Special characters in static resource

The nordic characters æøå are displayed as question marks in JS static resource after reopening the file in the Developer Console. An alert box with these characters will also display as question ...
user avatar
0 votes
1 answer
698 views

Create user with specific language and country

I need create user via apex with specific lang and country. For example with lang French and country Switzerland. I am trying create user with fields: LanguageLocaleKey='fr_CH', LocaleSidKey='fr_CH', ...
user avatar
  • 175
0 votes
3 answers
3k views

Convert String DateTime to User local DateTime

I need to convert the string datetime into user locale date time format. for Ex: //Consider this is Indian Time 22nd Dec 5 PM String dateTime = '12-22-2016 17:00:00'; I want to convert this as per ...
user avatar
  • 149
4 votes
0 answers
1k views

Set language / locale globally for a Lightning Application

Our customers send Quotes to various locales/languages, and need to see the quote in the recipient's locale. In Visualforce I can set a locale/language specifically by using <apex:page language="...
user avatar
1 vote
2 answers
993 views

Lightning component get user's language rather than user's locale

I have a few labels I use on my Lightning Components. They are all based on the user's locale but nothing changes when user's language changes. How can I change this ? My users never change locale ...
user avatar
  • 1,862
0 votes
2 answers
5k views

Convert String DateTime to User Locale Date Time

My string format : 10/11/2016 01:00 AM I want to convert this String to DateTime to support in every user's locale format I tried Date.parse, Date.valueOf but am not getting expected value. Any ...
user avatar
  • 149
3 votes
2 answers
2k views

Why is "starts with vowel sound" checkbox not available?

I'm creating custom objects in a developer org. I see in the docs that there is a checkbox for "starts with vowel sound". However I don't see it in my org. Instead, I have a combo box asking for the ...
user avatar
1 vote
0 answers
167 views

Date Field, User Locale and Visual Force Problem [closed]

I have a scenario, where i am implementing a VF page which is basically a Registration Page with DOB validating if the user is above 18. It also has style class and javascript attached to validation. ...
user avatar
2 votes
1 answer
188 views

Datepicker Issue in Visual workflow

I have my user "locale" set as Korean. There is simple visual workflow with a 'date' type field. And when choosing the date in the flow, it gives the error Invalid Date Though the dates are ...
user avatar
  • 3,954
2 votes
2 answers
330 views

Javascript datetime saved in SF field incorrectly

I have a html form where one of the input is date time. <input type="datetime-local"/> I am reading the form inputs using jQuery and sending them to the controller using actionFunction and ...
user avatar
3 votes
2 answers
496 views

Include Time Zone in standard UI date format

Does anyone know a way to include the time zone abbreviation on dates/times displayed on standard Salesforce forms? We have users who travel across the country, and we have a default time zone set, ...
user avatar
0 votes
0 answers
495 views

Where Clause in Query to match Phonenumber

How can I match for phonenumber in my whereclause? My query: SELECT id, Membership_number__c, Phone, Email FROM Contact WHERE Phone = :phoneNumberString Above mathces fine on these phonenumber ...
user avatar
1 vote
0 answers
130 views

Locale English(Ireland,Euro) not available in Locale dropdown

I have my Developer Org where "English(Ireland,Euro)" is avaialble in Locale dropdown in Language and Timezone. But, in my Customer Org that Locale is not avaibale in Locale dropdown. May I know the ...
user avatar
  • 57
1 vote
0 answers
1k views

Date and Number locale problem on html5 input type=date/number

Question Is there any chance to send data in generic date format (yyyy-mm-dd) in standard save method? I need to user apex:input type="date" (or number). But Salesforce save method is not ...
user avatar
0 votes
0 answers
411 views

Determine country of Sites Guest User (Anonymous user)

We have a site built on Communities and Force.com sites. What's the best way of determining which country a guest / anonymous user came from on a Force.com sites page? For registered users, we can ...
user avatar
  • 6,181
1 vote
0 answers
29 views

Using native translations in custom pages

Salesforce corporation has done most of the work translating the out-of-the-box app into a few dozen languages. This includes translations of Object, Field and Action names, which are relatively easy ...
user avatar
5 votes
1 answer
6k views

Translation, Localization and Internationalization Best Practices

There are plenty of things to keep in mind when trying to allow translation, localization and internationalization (t8n, l10n, i18n) in any framework. Salesforce has a whole infrastructure built ...
user avatar
2 votes
2 answers
64 views

es_NI locale not supporting for salesforce

When registering community user for NICARAGUA country "es_NI" Locale not supporting, but its supporting "es" locale. Why salesforce not supporting this particular locale and how can i solve this issue....
user avatar
1 vote
1 answer
260 views

My User LanguageLocaleKey gets overridden

I am trying to change my LanguageLocaleKey from "es" to "en_US". I go to Workbench update the record, get the confirmation screen and when I look at the field, it changed back to "es". What could it ...
user avatar
  • 255