1/33
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
What object stores information about the currencies in use by an org and what are some fields on the object?
CurrencyType - ConversionRate, DecimalPlaces, IsActive, IsoCode
What object stores historical exchange rate information for a multi-currency org? And what are some fields on the object?
DatedConversionRate - StartDate, NextStartDate, IsoCode, ConversionRate
What field defines which currency is used on a record and when will an object have it?
CurrencyISOCode is present on all objects with a Currency field
What does convertCurrency() do?
Function that performs numeric conversion of a record’s currency value into the user’s currency value in SOQL/SOSL.
What does format() do for multi currency?
Function that displays a currency value both in the original record source and in the currency of the current user in SOQL/SOSL
How can you display a translated value in Visualforce?
{!$ObjectType.[object].fields.name.label}
How do you access translated labels in Apex, provide an example if the label’s Name is Test_Label
System.Label.Test_Label
How do you translate a label in SOQL/SOSL?
Use toLabel()
How can you display data in Visualforce in the user’s locale.
<apex:outputField>
What does FORMAT() fo for multi locale?
Formats number, date, time and currency fields based on user’s locale in SOQL/SOSL
What is the problem with comparing specific string values or lengths related to multi language?
The comparison may not work if the language is changed
What can you call to get a user’s currency?
UserInfo.getDefaultCurrency()
What can you call to get a user’s language?
UserInfo.getLanguage()
What can you call to get a user’s location?
UserInfo.getLocale()
How can you check if the current organization uses multiple currencies?
Can call UserInfo.isMultiCurrencyOrganization()
How are Fully Supported languages handled?
All Salesforce features and user interface texts are automatically translated into the org’s default language.
How are end-user languages handled?
Labels for all standard objects and pages, except admin pages, Setup, and Help, can be translated using end-user languages. Right-to-left languages are also supported but have some limitations.
How are platform-only languages handled?
Custom apps and functionality developed in the Salesforce platform can be localized using platform-only languages, such as translating custom labels, objects, and fields and most standard labels, objects, and fields.
How should text field lengths be set related to multi language and why?
The lengths should be longer to handle longer translations. A three-word phrase in English, for example, may be translated as a fifteen-word phrase in Russian.
What tool can be used to translate customizations, like the field name of a custom object?
The Translate section of the Translation Workbench in Setup
What tool can be used to translate tabs and labels?
The Rename Tabs and Labels page in Setup.
Where can supported languages be added?
In the Translation Languages Settings section of the Translation Workbench in Setup
What should be used in multi-language instead of allowing users to type in free form text?
Picklists
What type of email templates should be used for multi-language and why?
Use Visualforce email templates instead of standard email templates for locale-aware and translation-friendly templates.
How can translations for custom labels be set?
In the Custom Labels page in Setup by adding entries to the Translations related list on a label.
How can we check if there is a translation for a custom label using apex?
Call System.Label.translationExists(namespace, label, language)
How can we retrieve the translation for a custom label?
Call System.Label.get(namespace, label, language)
How can we display a custom label in LWC?
{!$Label.customLabelName}
What does this query return for mutli currency if the user’s currency is USD for the record with CurrencyISO code of EUR if the EUR val is 150 and US is 175?
SELECT format(Purchase_Cost__c) FROM Bike_Part__c
EUR 150 (USD 175)
What methods in SOQL can convert a currency value into the user’s currency and display it correctly. Provide an example query if the field is Purchase_Cost__c on the Bike_Part__c object
convertCurrency
SELECT format(convertCurrency(Purchase_Cost__c)) FROM Bike_Part__c
When can we not use apex outputField related to multi currency and what is a workaround?
When Advanced Currency Management is enabled in the org.
In this case, the outputText component can be used.
How can we localize languages, currencies, and timezones in LWC and provide an example of a date and currency?
Use @salesforce/i18n
import LOCALE from"@salesforce/i18n/locale";
import CURRENCY from"@salesforce/i18n/currency";
let date = newDate(2024, 1, 14);
this.localDate = newIntl.DateTimeFormat(LOCALE).format(date);
let price = 11.99;
let setting = Intl.NumberFormat(LOCALE,{ style:'currency', currency:CURRENCY });
this.localPrice = setting.format(price);
Describe these 2 tables
DatedConversionRate
Currency Type
CurrencyType is a standard object used for storing currencies used by the organization. DatedConversionRate is a standard object used to store the dated exchange rates.
How can an LWC detect the locale of the current user?
Use the @salesforce/i18n scoped module