Skip to content

Translate sections, start pages, variants and more

Info

This will only work for customers running customizations in cloud or on-prem.

If you have a multi-language solution you might find that some parts seem untranslatable. Because Lime Admin doesn't allow you to provide translations for sections, start pages and variants. However, there is a way.

By following these instructions, you can provide translations for:

  • Sections (on card views)
  • Start pages
  • Variants
  • Actions
  • Custom tabs

This is the procedure:

  1. Add .po files to your solution.
  2. Release and deploy.
  3. Change the names in Lime Admin into localization keys.

1. Add .po files to your solution

First of all: what's a .po file? It's a text file that follows a specific format. It's mainly used as a small localization database.

A .po file for Lime CRM looks something like this:

en.po

#. When your package is loaded by the webclient, it adds your packages lib-name as prefix to ensure unique ids.
#. So while you define them here without a prefix, keep in mind that you have to use 
#. "solution_{your_solution_name}.custom.translation" instead of "custom.translation" in your code. For instance
#. "solution_vandelay.company_card_section.addresses"
msgid "custom.translation"
msgstr "This is the translation"


#################
## Sections on card views
#################
msgid "company_card_section.addresses"
msgstr "Addresses"

msgid "company_card_section.additional_info"
msgstr "Additional info"

msgid "deal_card_section.dates"
msgstr "Dates"

msgid "document_card_section.links"
msgstr "Links"

msgid "todo_card_section.links"
msgstr "Links"

msgid "history_card_section.links"
msgstr "Links"

msgid "campaign_card_section.other_info"
msgstr "Other info"

and the equivalent for Swedish looks like this:

sv.po

#. When your package is loaded by the webclient, it adds your packages lib-name as prefix to ensure unique ids.
#. So while you define them here without a prefix, keep in mind that you have to use 
#. "solution_{your_solution_name}.custom.translation" instead of "custom.translation" in your code. For instance
#. "solution_vandelay.company_card_section.addresses"
msgid "custom.translation"
msgstr "This is the translation"


#################
## Sections on card views
#################
msgid "company_card_section.addresses"
msgstr "Adresser"

msgid "company_card_section.additional_info"
msgstr "Övrig info"

msgid "deal_card_section.dates"
msgstr "Datum"

msgid "document_card_section.links"
msgstr "Länkar"

msgid "todo_card_section.links"
msgstr "Länkar"

msgid "history_card_section.links"
msgstr "Länkar"

msgid "campaign_card_section.other_info"
msgstr "Övrig info"

The msgid will be the id of your translation.

The msgstr will be what will be show to the user for the given id.

The proper way to create your .po files is to follow the documentation in the Development section.

Name your files accordingly:

  • English: en.po
  • Swedish: sv.po
  • Norwegian: no.po
  • Danish: da.po
  • Finnish: fi.po
  • Dutch: nl.po
  • German: de.po
  • French: fr.po

You should now have .po files in this directory of your solution:

{name_of_your_solution}/{name_of_your_solution}/translations/

It should look something like this:

2. Release and deploy

In order for your solution to access these files, you need to make a new release and deploy it.

Info

Save yourself some time. Do not release and deploy for each and every edit of these files. That will most likely lead to it taking you an hour to get a little translation into the solution. Rather have the approach of "let it be released with other stuff".

3. Add the keys in Lime CRM Admin

In Lime CRM Admin, use the msgid from the .po file on your section, start page or variant. When your translations are loaded by the web client, it adds your packages lib-name as prefix to ensure unique ids. So while you define them here without a prefix, keep in mind that you have to use "solution_{your_solution_name}.custom.translation" instead of "custom.translation" in your code. For instance "solution_vandelay.company_card_section.addresses"

  • For card sections, you enter the translation key in the field Section title
  • For start pages, you enter the translation key in the field Name
  • For variants, you enter the translation key in the field Name
  • For actions, you enter the translation key in the field Action label
  • For custom tabs, you enter the translation key in the field Title

The following are examples of configuration and result for a section and a start page, respectively:

Example of translated card view section configuration

The end result in English

Example of translated start page configuration

The end result in English