Day 16 : Translate Custom tabs with Custom Labels #TexeiAdventCalendar

By

3 minutes de lecture

Hi everyone, it’s me again ! I hope you had a great time yesterday with Mouloud HABCHI’s article, in case you missed it, you can find it here and see how dynamics forms work on Salesforce.


Today we will take our DeLorean, drive at the speed of 88 miles per hour and have a glance at Spring’21 release.

… Finally we can use custom labels in custom tabs …

I want to talk about this new feature because a lot of clients I worked for ask for that functionality and I think it’s a big improvement.

This will help you to offer, on a easy way, an enhanced experience to your users in my opinion.

How to do that ?

First you need to create a custom label. Go to “Setup > Custom Labels” and add a new one. For this article, I have created one named : “TEST_CUSTOM_LABEL” and its content is “FIRST TEST”. I usually use, as naming convention, “OBJNAME_PURPOSE_OF_LABEL”.

Then go on a record page, for this example I choose a dummy opportunity and then Edit the page from the Setup menu.

Now that you are in the app builder, go to the tabs section, add a new one and choose “Custom” in the picklist. In the Spring 21, you have now a helptext informing that you can use a custom label.

From app builder in Spring 21

As you can see on the screenshot, if you want to use your new custom label you have to employ the following format {!$Label.NameOfTheLabel}, in our case {!$Label.TEST_CUSTOM_LABEL}.

And Voila ! As you can see, the new custom tab name is “FIRST TEST”, this is the value of our custom label.

Result in English

After that, i added the translation in french (PREMIER TEST) for the label we used. And switched the user’s language to French.

“Welcome to October 21, 2015 Marty !”. Our tab is translated into french.

Result in French

I think everyone who was confronted with this issue / client’s request will enjoy this new feature like I do. And if you want to have a look of what you can do in spring 21, you can ask for a pre-release org here.


Hope you had a good read, and come back tomorrow for a new article written by Jorge Centeno.

Follow us on LinkedIn here and on Twitter here.

Want to continue learning? Check out our article Day 17: Analyze Your Lightning Page Performance.

Read more posts

Enforce code standards with PMD

Developers working on a project usually set coding rules to have a standardized codebase. It is an important piece of the code maintainability, and it can be very easy …
March 2023
Advices
Scratch orgs

Uncovering Salesforce Settings: A Step-by-Step Guide for Scratch Orgs

Today, it’s pretty easy to build your Scratch Org definition file when you know what Settings you want to activate, as they are mapped with the same setting names …
February 2023
Advices
Business Analyst

Core qualities of a Business Analyst?

A common definition we are used to hear is that being a Business Analyst means to have a combination of both hard skills and soft skills. What does a …
June 2022
Advices
Image d'illustration d'une employée travaillant sur un ordinateur portable

Process builder and workflow make way to Flows (½)

Overview “If you can do it with a Workflow, then do it with a Process Builder, because everything a Workflow does, a Process Builder does it better”. If you …
March 2022
Advices

Day 22 : Salesforce new “Migrate To Flow tool” in Spring 22

As most of you already know, the workflow rules and process builders are planned to be retired in 2023 (no precise date defined so far). Today, I’m going to …
December 2021
Advices

Day 18 : Fake callout responses for test classes !

Hello everybody ! Today let’s talk about Apex tests classes in Salesforce. Everyone loves a good test class, and Salesforce makes it official by requiring to have a minimum …
December 2021
Advices