Forum Discussion
Hi Zoe,
You might want to try moving the link markup into a couple of text keys and creating different text key entries for each language. For example, your markup might look like this:
<li>${text.format("custom.language_select.1.link")}</li> <li>${text.format("custom.language_select.2.link")}</li>
Then, you would go into Lithium Studio, go to the Text Editor tab, click the Search button, then add in entries for the two text keys you added to your component for english:
custom.language_select.1.link = <a href="/community/?category.id=Spanish">Espanol</a> custom.language_select.2.link = <a href="/community/?category.id=German">Deutsch</a>
Next, select Spanish from the Language drop-down and add the same text keys in for Spanish:
custom.language_select.1.link = <a href="/community/?category.id=English">English</a> custom.language_select.2.link = <a href="/community/?category.id=German">Deutsch</a>
Finally, select German from the Language drop-down and add the same text keys in for German:
custom.language_select.1.link = <a href="/community/?category.id=English">English</a> custom.language_select.2.link = <a href="/community/?category.id=Spanish">Espanol</a>
Now the markup will always render correctly for Spanish and German wherever they are set (be it a category, sub-category, or board) and will fall back to English if the language is not Spanish or German.
I hope that helps!
-Doug
- RobbL14 years agoLithium Alumni (Retired)
Hi Zoe,
To find additional help and support with questions related to Freemarker you can also check the part of the Lithosphere that is designed for developer questions. Just click on the right-most tab labeled "Develop" in the navigation bar towards the top of the page.
Related Content
- 5 hours ago
- 12 months ago
- 4 years ago
- 13 years agoInactive User