Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: How to make localised custom text in Configurable Theme Settings?
Hey all, I've followed this tutorial https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-1/making-configurable-theme-settings to make an editable disclaimer for the footer of my site. I think it is a good feature, as the disclaimer might need to be changed by someone who only access the portal's settings instead of Language.properties files.
However, the site is multilingual and needs the disclaimer to be written in multiple languages. How do I make the configurable theme settings cater multiple languages?
However, the site is multilingual and needs the disclaimer to be written in multiple languages. How do I make the configurable theme settings cater multiple languages?
Jason CheeHey all, I've followed this tutorial https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-1/making-configurable-theme-settings to make an editable disclaimer for the footer of my site. I think it is a good feature, as the disclaimer might need to be changed by someone who only access the portal's settings instead of Language.properties files.You could embed a Web Content Article in your theme and make its ID configurable. The translation would be made within the article itself.
However, the site is multilingual and needs the disclaimer to be written in multiple languages. How do I make the configurable theme settings cater multiple languages?
This sounds like a good workaround. However, does this also mean the configurable theme settings don't support locales?
Jason CheeI'm typically keeping myself away from themes these days, but in the days when I was still touching them, the configurable values weren't configurable. I assume that they still aren't, because this would raise complexity significantly, and a good workaround exists with the given technique.
This sounds like a good workaround. However, does this also mean the configurable theme settings don't support locales?
Note that you can embed static content in your theme, or in your layout template - both would be valid considerations (but again, that's independent of the locales)
Hey Olaf, I tried to apply your technique but I've encountered a separate issue: https://community.liferay.com/forums/-/message_boards/message/113179098?_com_liferay_message_boards_web_portlet_MBPortlet_showBreadcrumb=false
Just wondering if you know what caused this?
Just wondering if you know what caused this?
Hi Jason,
I once say this solved by adding a theme setting for each language, which worked, but it's a very effective solution if you plan to grow the number of languages you support in the future. What Olaf is suggesting I think is the best answer because (as you pointed out) theme settings don't suport locales. In fact, theme settings really aren't (imho) designed for such purposes so it makes sense that they are not localizeable.
I have had to do similar things to what you are asking in the past and have always leaned on a Web Conten portlet combined with the runtime tag to embed it. It also has the added benefit of being runtime configurable (ie. no deployment to change) where as the Language.properties solution would require a new build to alter the text.
In the end, my client who tried to fake it with theme settings regretted the cheat the very first time they have to add a new locale to their site.
I once say this solved by adding a theme setting for each language, which worked, but it's a very effective solution if you plan to grow the number of languages you support in the future. What Olaf is suggesting I think is the best answer because (as you pointed out) theme settings don't suport locales. In fact, theme settings really aren't (imho) designed for such purposes so it makes sense that they are not localizeable.
I have had to do similar things to what you are asking in the past and have always leaned on a Web Conten portlet combined with the runtime tag to embed it. It also has the added benefit of being runtime configurable (ie. no deployment to change) where as the Language.properties solution would require a new build to alter the text.
In the end, my client who tried to fake it with theme settings regretted the cheat the very first time they have to add a new locale to their site.
Alright, I shall try with Web Content as suggested by you and Olaf. Thanks!
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™