Hi today I will share how to use in built Liferay I18N functionality to your custom portlet in Liferay 6.x
It is very simple to add it , for that we need to modify just 2 files.
1.portlet.xml --- In this file add resource bundle entry.
e.g <resource-bundle>content.Language</resource-bundle>
2.build.xml --- In this file we need to call below target.
<target name="build-lang">
<antcall target="build-lang-cmd">
<param name="lang.dir" value="docroot/WEB-INF/src/content" />
<param name="lang.file" value="Language" />
</antcall>
</target>
Now we need to just add one file with name Language.properties under docroot/WEB-INF/src/content
from build.xml using ant call buil-lang. That it !!!
1 comment:
Nice post :)
I ran the ant build from Eclipse JEE Juno and it complained about ECJ not installed. I have fixed that issue by following the steps on this wiki: http://www.liferay.com/community/wiki/-/wiki/Main/ECJ See Configure Eclipse IDE to use ECJ.
Post a Comment