简体   繁体   English

将自定义翻译字符串添加到liferay主题

[英]Add custom translation Strings to liferay theme

I want to add some Translations to my Theme to call it with #language("key") in my template.vm files. 我想在我的主题中添加一些翻译,以便在template.vm文件中使用#language("key")进行调用。 After googling around I have still no clue where to place the Language.properties files. 在四处搜寻之后,我仍然不知道在哪里放置Language.properties文件。

Is it even possible to add Translations to a Theme? 甚至可以将翻译添加到主题吗? If so where I have to place these files? 如果是这样,我必须将这些文件放在哪里?

Thx in advance - Florian 预先感谢-Florian

Create a hook to override the language files. 创建一个钩子以覆盖语言文件。

Refer Overriding language in below link 请参阅以下链接中的覆盖语言

It is very simple.. Add your "custom-key" on portal-impl.jar file for the language specific properties files. 这非常简单。在语言特定的属性文件的portal-impl.jar文件上添加“自定义键”。 You could able to find language properties at portal-impl.jar\\content\\Language.properties. 您可以在portal-impl.jar \\ content \\ Language.properties中找到语言属性。 On .vm file add #language("custom-key"). 在.vm文件上,添加#language(“ custom-key”)。 Restart the server. 重新启动服务器。

Thanks & Regards, Thiyagu.L 谢谢与问候,Thiyagu.L

在此处输入图片说明

Please check this image and hope it is helpful for you In words create a folder docroot/WEB-INF/src folder this three are not different folder if you see in your project in your package explorer then this is the first folder inside your project. 请检查此图像,希望对您有帮助。如果您在包资源管理器中的项目中看到了这三个文件夹,则用字创建一个docroot / WEB-INF / src文件夹,这是项目中的第一个文件夹。 Thanks and regards asif aftab 感谢和问候asif aftab

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM