如何快速获得Liferay主题中的languageid [英] How to obtain the languageid in a Liferay theme with velocity
本文介绍了如何快速获得Liferay主题中的languageid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在创建当前主题时,需要根据当前语言更改多个图像.
For the current theme im creating there are multiple images that require to change based on the current language.
例如,如果用户以英语访问页面,我们将加载image_ 语言ID .jpg
For example if the user is visiting the page in english we would load image_languageid.jpg
如何用速度&中的语言的实际ID替换 languageid .生命之光?
How can you replace languageid with the actual id of the language in velocity & liferay?
这是一种好技术还是更好的技术?
Is this a good technique or is there a nicer one?
推荐答案
尝试在init_custom.vm
或portal_normal.vm
#set ($language_id = $themeDisplay.getLanguageId())
这篇关于如何快速获得Liferay主题中的languageid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文