Forum Discussion
Hi Catherine,
You can accomplish this by using a custom text key.
First, you could create a custom text key, add it to the Text Properties for each language, and finally give it a value depending on the language.
Steps:
1) Navigate to Studio
2) Choose the Text Editor tab
3) Choose the language of your choice from the Language drop-down menu
4) Click the Search button.
5) You should see a list of search results. Just below that, you should see a text box titled Text Properties
6) Here, you can add a custom text key (Example: customer.custom.textkey.title = test)
7) Once finished, click the Save button.
To give this text key a different value for other languages, repeat the above process, except choose a different language from the drop down menu in step #3. From there, follow the same steps and enter a new value for the text key when adding this to the text properties for the other language(s).
After you've done this, you could use the following syntax in your custom component to reference the text key and display the contents:
${text.format("customer.custom.textkey.title")}
This way, a user will see the content of that text key in the respective language depending on what they have their profile language set to.
Please let me know if any clarification is needed. I hope this is helpful. :)
Hello Jeff S -
I did a search for text keys and see that some of the text keys I thought I was going to create are already in your system. Are those text keys pretty stable? Can I use the ones already created for my custom components?
Thanks so much,
Catherine
Related Content
- 7 months ago
- 2 years ago