Translation in template files

#1

In javascript we can use translation keys as follows:

C3.script.helpers.getTranslationValue("{~KEY~}", this.get('environment.translations'))

How can we use them in template files, i.e. .c3ml?

0 Likes

#2

A variable can be added to the c3ui page to get the translation. Then include the variable on the c3ml template.

In the c3ui file:
“headerContent”: “{~DeveloperAdmin.GetStarted.header.content~}”,

In the c3ml file:
{{ span headerContent }}

2 Likes