Fórumok
language.properties override using hook plugin....
Rojalin Patri, módosítva 12 év-val korábban
language.properties override using hook plugin....
Expert Bejegyzések: 287 Csatlakozás dátuma: 2011.03.22. Legújabb bejegyzések
Hi all,
i am trying to create a hook to override the language.properties file.I have created the hook and i have placed my customized language.properties in side my-hook/doc root/WEB-INF/classes/content/Language.properties and i have added the following line in liferay-hook.xml
<hook>
<language-properties>content/Language_en.properties</language-properties>
</hook>
but it's not recognizing..no effect after restarting my Tomcat.
Where i am going wrong??????????
i have gone through the liferay Developers Guide...but i didn't get what should be the directory structure in the hook.
any suggestions on this.........................
i am trying to create a hook to override the language.properties file.I have created the hook and i have placed my customized language.properties in side my-hook/doc root/WEB-INF/classes/content/Language.properties and i have added the following line in liferay-hook.xml
<hook>
<language-properties>content/Language_en.properties</language-properties>
</hook>
but it's not recognizing..no effect after restarting my Tomcat.
Where i am going wrong??????????
i have gone through the liferay Developers Guide...but i didn't get what should be the directory structure in the hook.
any suggestions on this.........................
Ronak Patel, módosítva 12 év-val korábban
RE: language.properties override using hook plugin....
New Member Bejegyzések: 19 Csatlakozás dátuma: 2010.01.20. Legújabb bejegyzések
I have not used this but we generally provide the location value starts with /.
Provide the value like
<hook>
<language-properties>/content/Language_en.properties</language-properties>
</hook>
Thanks,
Ronak
Provide the value like
<hook>
<language-properties>/content/Language_en.properties</language-properties>
</hook>
Thanks,
Ronak
Rojalin Patri, módosítva 12 év-val korábban
RE: language.properties override using hook plugin....
Expert Bejegyzések: 287 Csatlakozás dátuma: 2011.03.22. Legújabb bejegyzésekRonak Patel:
<hook>
<language-properties>/content/Language_en.properties</language-properties>
</hook>
Hi Ronak,
i know that we have to give the above path inside the liferay-hook.xml.but i am confused what would be the folder structure of the hook.Let me make it clear...
After creating a hook you will be getting "docroot" and "build.xml" inside it.Inside docroot by default WEB-INF folder will be there and inside WEB-INF an "lib" folder, "liferay-hook.xml" and "liferay-plugin-package.properties" are there.So my doubt is whether to place language-xxx.properties inside WEB-INF/lib or i have to create a folder named "src" there and inside src a "content" folder,then keeping the language file there.....????????????
i have already created the src/content/language-xxx.properties...but it's not working......
Can anyone guide me please??????????????
Thanks
Rojalin
Jay Patel, módosítva 12 év-val korábban
RE: language.properties override using hook plugin....
Regular Member Bejegyzések: 118 Csatlakozás dátuma: 2010.02.24. Legújabb bejegyzésekRojalin Patri:
Ronak Patel:
<hook>
<language-properties>/content/Language_en.properties</language-properties>
</hook>
Hi Ronak,
i know that we have to give the above path inside the liferay-hook.xml.but i am confused what would be the folder structure of the hook.Let me make it clear...
After creating a hook you will be getting "docroot" and "build.xml" inside it.Inside docroot by default WEB-INF folder will be there and inside WEB-INF an "lib" folder, "liferay-hook.xml" and "liferay-plugin-package.properties" are there.So my doubt is whether to place language-xxx.properties inside WEB-INF/lib or i have to create a folder named "src" there and inside src a "content" folder,then keeping the language file there.....????????????
i have already created the src/content/language-xxx.properties...but it's not working......
Can anyone guide me please??????????????
Thanks
Rojalin
Hi,
This language file should definitely go inside "src/content/" directory of hook.
but still if you don't see your changes try renaming the property file from "language-en.properties" to "language-en_US.properties", if you are using default Locale.
Best Regards,
Jay.
Rojalin Patri, módosítva 12 év-val korábban
RE: language.properties override using hook plugin....
Expert Bejegyzések: 287 Csatlakozás dátuma: 2011.03.22. Legújabb bejegyzésekJay Patel:
Rojalin Patri:Ronak Patel:
<hook>
<language-properties>/content/Language_en.properties</language-properties>
</hook>
This language file should definitely go inside "src/content/" directory of hook.
but still if you don't see your changes try renaming the property file from "language-en.properties" to "language-en_US.properties", if you are using default Locale.
Hi Jay,
still no luck......it's not reflecting........can you plase give me the detail procedure for this so this overriding method so that i can cross verify and point out where i have gone wrong.................
any other ideas from any body is greatly appreciated.....
please help.............
Thanks
Rojalin
Pugalendhi Radhakrishnan, módosítva 10 év-val korábban
RE: language.properties override using hook plugin....
New Member Bejegyzések: 14 Csatlakozás dátuma: 2013.11.18. Legújabb bejegyzések
hi jay,
thanks for that thread link..
thanks for that thread link..
Victor Chirita, módosítva 9 év-val korábban
RE: language.properties override using hook plugin....
New Member Bejegyzések: 3 Csatlakozás dátuma: 2012.02.13. Legújabb bejegyzések
Thanks guys!
The hook method is working!
The hook method is working!
Javier Solana, módosítva 9 év-val korábban
RE: language.properties override using hook plugin....
Junior Member Bejegyzések: 59 Csatlakozás dátuma: 2014.06.26. Legújabb bejegyzések
Yeah man! under the src folder is the place. Thanks!
Sagar A Vyas, módosítva 12 év-val korábban
RE: language.properties override using hook plugin....
Liferay Master Bejegyzések: 679 Csatlakozás dátuma: 2009.04.17. Legújabb bejegyzések
Hi Rojalin,
Step 1) Put this things in liferay-hook.xml as it is descriptor
<hook>
<language-properties>
content/Language.properties
</language-properties>
</hook>
Step 2) Put your Language.properties file in following path
docroot/WEBINF/
src/content/Language.properties
It Should Work
Thanks,
Sagar Vyas
Step 1) Put this things in liferay-hook.xml as it is descriptor
<hook>
<language-properties>
content/Language.properties
</language-properties>
</hook>
Step 2) Put your Language.properties file in following path
docroot/WEBINF/
src/content/Language.properties
It Should Work
Thanks,
Sagar Vyas
Rojalin Patri, módosítva 12 év-val korábban
RE: language.properties override using hook plugin....
Expert Bejegyzések: 287 Csatlakozás dátuma: 2011.03.22. Legújabb bejegyzésekSagar A Vyas:
Hi Rojalin,
Step 1) Put this things in liferay-hook.xml as it is descriptor
<hook>
<language-properties>
content/Language.properties
</language-properties>
</hook>
Step 2) Put your Language.properties file in following path
docroot/WEBINF/
src/content/Language.properties
It Should Work
Hi Sagar,
i have done the same.i want to override Language_en.properties.So i have kept my Language_en.properties in src/content and i have added
<hook>
<language-properties>
content/Language_en.properties
</language-properties>
</hook> in liferay-hook.xml.
Then i created the war and hot deployed it.after restarting the server it's creating my-hook folder inside webapps but doesn't override the text i want to.
i am still puzzled where i am going wrong......
Mani kandan, módosítva 12 év-val korábban
RE: language.properties override using hook plugin....
Expert Bejegyzések: 492 Csatlakozás dátuma: 2010.09.15. Legújabb bejegyzések
Rojalin Patri, módosítva 12 év-val korábban
RE: language.properties override using hook plugin....
Expert Bejegyzések: 287 Csatlakozás dátuma: 2011.03.22. Legújabb bejegyzésekMani kandan:
Hi Rojalin,
It should work you may check this trunk
Username : guest
Password : no password give empty
For reference check this thread
Hi Mani,
i tried as per the steps given in above links.still no effect......i wonder whether implementation of hooks for overriding language properties is possible in this way or not....i am attaching my hook here.please have a look and point out what is going wrong here...
Mellékletek:
Jay Patel, módosítva 12 év-val korábban
RE: language.properties override using hook plugin....
Regular Member Bejegyzések: 118 Csatlakozás dátuma: 2010.02.24. Legújabb bejegyzésekRojalin Patri:
Mani kandan:Hi Rojalin,
It should work you may check this trunk
Username : guest
Password : no password give empty
For reference check this thread
Hi Mani,
i tried as per the steps given in above links.still no effect......i wonder whether implementation of hooks for overriding language properties is possible in this way or not....i am attaching my hook here.please have a look and point out what is going wrong here...
Hi Rojalin,
I have attached my hook war with this post corresponding to my version & it is working completely fine.
I have made following changes in your war file:
1. Added "src\content" folders under WEB-INF
2. Renamed language property file from "Language_en.properties" to "Language_en_US.properties" (This I had suggested to you in earlier post)
3. Changed path in liferay-hook.xml from "<language-properties>content/Language_en.properties</language-properties>" to "<language-properties>content/Language_en_US.properties</language-properties>"
4. Sample message which I have overridden using this file is "your-request-processed-successfully=successfully."
So now whenever you perform some action successfully after deploying this hook, it will show you message "successfully." rather than original message of Liferay which is "Your request processed successfully."
Cheers,
Jay.
Mellékletek:
Rojalin Patri, módosítva 12 év-val korábban
RE: language.properties override using hook plugin....
Expert Bejegyzések: 287 Csatlakozás dátuma: 2011.03.22. Legújabb bejegyzések
Thanks a lot Jay,this is working fine in my bundle too.
but one thing i wonder,i don't have Language_en_US.properties in my portal-impl.jar.Then how is it overriding the same through hook???????????? previously i had tried overriding the same through EXT and Language-ext_en.properties and it was overriding the same successfully.So that means it was fetching the text values from the Language_en.properties.But here,when i tried to override the same using hook,then it's overriding a strange file which is not present in the bundle........
Could you please clarify my doubt.......
Thanks
Rojalin
but one thing i wonder,i don't have Language_en_US.properties in my portal-impl.jar.Then how is it overriding the same through hook???????????? previously i had tried overriding the same through EXT and Language-ext_en.properties and it was overriding the same successfully.So that means it was fetching the text values from the Language_en.properties.But here,when i tried to override the same using hook,then it's overriding a strange file which is not present in the bundle........
Could you please clarify my doubt.......
Thanks
Rojalin
Mani kandan, módosítva 12 év-val korábban
RE: language.properties override using hook plugin....
Expert Bejegyzések: 492 Csatlakozás dátuma: 2010.09.15. Legújabb bejegyzések
Jay Patel, módosítva 12 év-val korábban
RE: language.properties override using hook plugin....
Regular Member Bejegyzések: 118 Csatlakozás dátuma: 2010.02.24. Legújabb bejegyzések
Yi Chen Chen, módosítva 11 év-val korábban
RE: language.properties override using hook plugin....
New Member Bejegyzések: 7 Csatlakozás dátuma: 2012.02.10. Legújabb bejegyzések
Dear Sir,
There are three issues needing to consult with you.
First, the Language_zh_TW.properties files extracted from "http://translate.liferay.com/pootle/zh_TW/portal/", "https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/content/Language_zh_TW.properties", and "http://subversion.assembla.com/svn/liferay/portal-impl/src/content/Language_zh_TW.properties.native" are different. I have no idea why the aforementioned three Language_zh_TW.properties files are different. Which one is the official Language_zh_TW.properties?
Second, the Language_zh_TW.properties files extracted from "http://translate.liferay.com/pootle/zh_TW/portal/" can be used for Liferay Portal Community Edition 6.0.5, right?
Third, I'm using Liferay Portal Community Edition 6.0.5 Bundled with GlassFish Server Open Source Edition 3.0.1. I have got a problem with my languages hook: changes are always not applied. I have no idea why my liferay_zh_TW_lang_hook.war language hook is not work.
Please help me to clarify the aforementioned issues I have encountered, thank you very much!
Best Regards and Have a Nice Day
Yi Chen, Chen
There are three issues needing to consult with you.
First, the Language_zh_TW.properties files extracted from "http://translate.liferay.com/pootle/zh_TW/portal/", "https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/content/Language_zh_TW.properties", and "http://subversion.assembla.com/svn/liferay/portal-impl/src/content/Language_zh_TW.properties.native" are different. I have no idea why the aforementioned three Language_zh_TW.properties files are different. Which one is the official Language_zh_TW.properties?
Second, the Language_zh_TW.properties files extracted from "http://translate.liferay.com/pootle/zh_TW/portal/" can be used for Liferay Portal Community Edition 6.0.5, right?
Third, I'm using Liferay Portal Community Edition 6.0.5 Bundled with GlassFish Server Open Source Edition 3.0.1. I have got a problem with my languages hook: changes are always not applied. I have no idea why my liferay_zh_TW_lang_hook.war language hook is not work.
Please help me to clarify the aforementioned issues I have encountered, thank you very much!
Best Regards and Have a Nice Day
Yi Chen, Chen
Mellékletek:
Hitoshi Ozawa, módosítva 11 év-val korábban
RE: language.properties override using hook plugin....
Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
Yi, thank you for you post but please create a new thread because you question if different from the subject of this thread. It getting confusing determining if the question has been answered when there are several different question in a thread.