In global projects, there are occasions when translation is necessary. This is especially important in non-English speaking countries or places where English is not commonly used, particularly when using Salesforce. This post will cover the necessity of translation, the languages supported by Salesforce, and how to proceed with translations. While Salesforce officially supports multiple languages, custom content, and specific terminologies require individual translations.
The Necessity of Translation
There might be skepticism about why translations are needed even though Salesforce supports official languages. Translations are crucial in the following scenarios:
- Custom Fields and Messages: If Salesforce supports the user's language, changes in the user's language setting are applied automatically. However, fields and messages created during development or operations are not automatically translated.
- PDF Documents: These are custom-developed areas. Developers must ensure translations through custom label connections (no automatic translations).
- Industry Terminology: The same word might have different meanings between general use and industry-specific contexts.
Salesforce Official Language Support
Salesforce categorizes its language support into three levels.
- Fully supported languages: Salesforce features and user interface (UI) text appear in the chosen language.
- You can change the language for all features, including Help, to one of the following fully supported languages from the Setup page. Enter Company Information in the Quick Find box, select Company Information, and then select Edit. In the Default language field, select your desired language and click Save.
- End-user languages: End-user languages allow individual users to select a language other than the company’s default language for end-user-facing UI.
- End-user languages are useful if you have a multilingual organization or partners who speak languages other than your company’s default language. For end-user languages, Salesforce provides translated labels for standard objects and pages, except admin pages, Setup, and Help.
- Platform-only languages: In situations where Salesforce doesn’t provide default translations, use platform-only languages to localize apps and custom functionality that you build on the Salesforce Platform.
- Use platform-only languages to localize apps and custom functionality that you build on the Salesforce Platform. You can translate items such as custom labels, custom objects, and field names. You can also rename most standard objects, labels, and fields. Informational text and non-field label text aren’t translatable.
Fully supported languages | End-user languages | Platform-only languages |
- Chinese (Simplified): zh_CN - Chinese (Traditional): zh_TW - Danish: da - Dutch: nl_NL - English: en_US - Finnish: fi - French: fr - German: de - Italian: it - Japanese: ja - Korean: ko - Norwegian: no - Portuguese (Brazil): pt_BR - Russian: ru - Spanish: es - Spanish (Mexico): es_MX Spanish (Mexico) defaults to Spanish for customer-defined translations. - Swedish: sv - Thai: th The Salesforce user interface is fully translated to Thai, but Help is in English. |
- Arabic: ar - Bulgarian: bg - Croatian: hr - Czech: cs - English (UK): en_GB - Greek: el - Hebrew: iw - Hungarian: hu - Indonesian: in - Polish: pl - Portuguese (European): pt_PT - Romanian: ro - Slovak: sk - Slovenian: sl - Turkish: tr - Ukrainian: uk - Vietnamese: vi |
- Albanian: sq - Afrikaans: af - Amharic: am - Arabic (Algeria): ar_DZ - Arabic (Bahrain): ar_BH - Arabic (Egypt): ar_EG - Arabic (Iraq): ar_IQ - Arabic (Jordan): ar_JO - Arabic (Kuwait): ar_KW - Arabic (Lebanon): ar_LB - Arabic (Libya): ar_LY - Arabic (Morocco): ar_MA - Arabic (Oman): ar_OM - Arabic (Qatar): ar_QA - Arabic (Saudi Arabia): ar_SA - Arabic (Sudan): ar_SD - Arabic (Syria): ar_SY - Arabic (Tunisia): ar_TN - Arabic (United Arab Emirates): ar_AE - Arabic (Yemen): ar_YE - Armenian: hy - Basque: eu - Bosnian: bs - Bengali: bn - Burmese: my - Catalan: ca - Chinese (Hong Kong): zh_HK - Chinese (Singapore): zh_SG - Chinese (Malaysia): zh_MY - Chuj: cac - Dutch (Belgium): nl_BE - English (Australia): en_AU - English (Belgium): en_BE - English (Canada): en_CA - English (Cyprus): en_CY - English (Germany): en_DE - English (Hong Kong): en_HK - English (India): en_IN - English (Ireland): en_IE - English (Israel): en_IL - English (Italy): en_IT - English (Malaysia): en_MY - English (Malta): en_MT - English (Netherlands): en_NL - English (New Zealand): en_NZ - English (Philippines): en_PH - English (Singapore): en_SG - English (South Africa): en_ZA - English (United Arab Emirates): en_AE - Estonian: et - Farsi: fa - French (Belgium): fr_BE - French (Canada): fr_CA - French (Luxembourg): fr_LU - French (Morocco): fr_MA - French (Switzerland): fr_CH - Georgian: ka - German (Austria): de_AT - German (Belgium): de_BE - German (Luxembourg): de_LU - German (Switzerland): de_CH - Greek (Cyprus): el_CY - Greenlandic: kl - Gujarati: gu - Hawaiian: haw - Haitian Creole: ht - Hindi: hi - Hmong: hmn - Icelandic: is - Irish: ga - Italian (Switzerland): it_CH - Kaqchikel: cak - Kannada: kn - Kazakh: kk - Khmer: km - Kiche: quc - Latvian: lv - Lithuanian: lt - Luxembourgish: lb - Macedonian: mk - Malay: ms - Malayalam: ml - Maltese: mt - Marathi: mr - Montenegrin: sh_ME - Punjabi: pa - Romanian (Moldova): ro_MD - Romansh: rm - Russian (Armenia): ru_AM - Russian (Belarus): ru_BY - Russian (Kazakhstan): ru_KZ - Russian (Kyrgyzstan): ru_KG - Russian (Lithuania): ru_LT - Russian (Moldova): ru_MD - Russian (Poland): ru_PL - Russian (Ukraine): ru_UA - Samoan: sm - Serbian (Cyrillic): sr - Serbian (Latin): sh - Spanish (Argentina): es_AR - Spanish (Bolivia): es_BO - Spanish (Chile): es_CL - Spanish (Colombia): es_CO - Spanish (Costa Rica): es_CR - Spanish (Dominican Republic): es_DO - Spanish (Ecuador): es_EC - Spanish (El Salvador): es_SV - Spanish (Guatemala): es_GT - Spanish (Honduras): es_HN - Spanish (Nicaragua): es_NI - Spanish (Panama): es_PA - Spanish (Paraguay): es_PY - Spanish (Peru): es_PE - Spanish (Puerto Rico): es_PR - Spanish (United States): es_US - Spanish (Uruguay): es_UY - Spanish (Venezuela): es_VE - Swahili: sw - Tagalog: tl - Tamil: ta - Te reo: mi - Telugu: te - Urdu: ur - Welsh: cy - Xhosa: xh - Yiddish: ji - Zulu: zu |
Reference: https://help.salesforce.com/s/articleView?id=sf.faq_getstart_language_support.htm&type=5
How to Translate?
Enabling Translations
The language for which translation is needed must be activated. For illustration, let's assume a foreign contractor is translating for a Korean corporate client.
Setup -> Translation Workbench -> Click Korean -> Active
Translating Standard Objects and Fields
Setup -> Rename Tabs and Labels
Let's proceed with translating "Opportunity."
When translating an object name, it's noted that the name used elsewhere is also changed.
Custom Area Translations
Setup -> Translate
Consider this area for all translation tasks, including actions, field names, help texts, picklists, etc. As a test, let's arbitrarily translate the Opportunity's Stage value "Closed Won" to "승리."
Check The Result
Let's update the user's language to Korean.
successful application of the translation can be observed. Despite Salesforce supporting the language officially, English is still visible due to:
- Not all supported languages are translated 100%.
- Custom areas are not covered.
Custom Label
Custom Labels are text values that can contain up to 1,000 characters, usable in Apex, Visualforce, Lightning Component, and LWC.
Setup -> Custom Label
Let's create a custom label. Typically, the Value is written in English (as the default language for Orgs is mostly English). After creation, add translations by clicking New.
Enter the Korean translation and save.
trigger OpportunityTrigger on Opportunity (before update) {
for (Opportunity opp : Trigger.new) {
if (Trigger.isUpdate) {
//// This trigger iterates through the list of updated Opportunities and adds an error message
//using the addError method if the trigger context is an update operation.
//This will prevent the Opportunity from being saved and display the error message to the user.
opp.addError(System.Label.SALES_OPPTY_MSG);
}
}
}
A simple example demonstrates how custom labels can be utilized in code. This code ensures that upon an update in Opportunity, an error message is displayed, preventing progress (designed for demonstration).
In Apex, custom labels are accessed via the System.Label.label API name.
Depending on the user's language setting (English or Korean), the corresponding message is displayed.
'Salesforce > Development_English' 카테고리의 다른 글
Salesforce Development - Development Environment (IntelliJ, SFDX) (0) | 2024.02.25 |
---|