2013-07-02 95 views
0

嗨我有一個用於forgot_password.jsp和其他登錄相關portlet的鉤子。如何使用JSP的現有鉤子覆蓋Languange_ru.properties?

在我的forgot_password.jsp中,我有一個按鈕,其值爲send-password-reset-link。

對於本條目沒有俄文翻譯。所以我想爲Language_ru.properties添加鉤子。

在Liferay的-hook.xml我加 COM/DCP /服務門戶/門戶/掛機/資源/ Language_ru.properties

它沒有工作這麼參照一些線程在Liferay的論壇上,我加入 content/Language_ru.properties

它也沒有奏效。我也嘗試將屬性文件從Language_ru.properties重命名爲Language_ru_RU.properties。但運氣不好。

回答

0

感謝您的幫助。我發現我的語言鉤子不工作的原因。實際上,在我的項目中,我們已經有了Language-ext_ru.properties,它們的優先級高於Language_ru_RU.properties和Languange_ru.properties。這就是我無法爲Langauge_ru.properties應用鉤子的原因。

2

添加到portlet.xml資源包

<portlet> 
    <portlet-name>My Portlet</portlet-name> 
    <portlet-class>com.my.MyPortlet</portlet-class> 
    <init-param> 
     <name>view-jsp</name> 
     <value>/html/view.jsp</value> 
    </init-param> 
    <expiration-cache>0</expiration-cache> 
    <supports> 
     <mime-type>text/html</mime-type> 
    </supports> 
    <resource-bundle>content/Language</resource-bundle> 
    <portlet-info> 
     <title>My Portlet</title> 
    </portlet-info> 
    <security-role-ref> 
     <role-name>administrator</role-name> 
    </security-role-ref> 
</portlet> 

,並把Language_ru.propertiessrc/content/

欲瞭解更多詳情,請參閱http://goo.gl/CmMju

+0

嗨@Mark感謝您的回覆。 :) –