フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
ruchi gupta
modify long text under language portlet
2011/11/05 23:30
答え

ruchi gupta

ランク: New Member

投稿: 12

参加年月日: 2011/07/31

最近の投稿

Hi All,
I want only language name instead of language(country) like only gujarati instead of gujarati(india).
plz suggest me how can i do this?
ruchi gupta
RE: modify long text under language portlet
2011/11/05 23:35
答え

ruchi gupta

ランク: New Member

投稿: 12

参加年月日: 2011/07/31

最近の投稿

any body help me its urgent for me.
Sagar A Vyas
RE: modify long text under language portlet
2011/11/06 2:27
答え

Sagar A Vyas

ランク: Liferay Master

投稿: 655

参加年月日: 2009/04/17

最近の投稿

ruchi gupta:
Hi All,
I want only language name instead of language(country) like only gujarati instead of gujarati(india).
plz suggest me how can i do this?


Hi Ruchi,

Can give us some more details on same ? I am not getting what are you trying to ask ?

Thanks,
Sagar Vyas
ruchi gupta
RE: modify long text under language portlet
2011/11/06 4:40
答え

ruchi gupta

ランク: New Member

投稿: 12

参加年月日: 2011/07/31

最近の投稿

Hi Sagar,


My requirement is, only language are shown in language portlet. In language portlet their are 4 option for display language icon,long text, short text and select box.When i choose select box than language look like this hindi ( india) . If i add another indian language than its also display in same manner. But i want to display only name of language like hindi not hindi(india). So plz suggest how i do this?emoticonemoticon
Sagar A Vyas
RE: modify long text under language portlet
2011/11/06 11:14
答え

Sagar A Vyas

ランク: Liferay Master

投稿: 655

参加年月日: 2009/04/17

最近の投稿

Hi Ruchi,

For this you need to change jsp page of language portlet.

You need to create hook for same of page.jsp.

<aui:form action="<%= formAction %>" method="post" name="<%= formName %>">
<aui:select changesContext="<%= true %>" label="" name="<%= name %>" onChange='<%= "submitForm(document." + namespace + formName + ");" %>' title="language">

<%
for (int i = 0; i < locales.length; i++) {
%>

<aui:option cssClass="taglib-language-option" label="<%= locales.getDisplayName(locales) %>" lang="<%= LocaleUtil.toW3cLanguageId(locales) %>" selected="<%= (locale.getLanguage().equals(locales.getLanguage()) && locale.getCountry().equals(locales.getCountry())) %>" value="<%= LocaleUtil.toLanguageId(locales) %>" />

<%
}
%>

</aui:select>
</aui:form>


You will find this kind of code on page.jsp located on \tomcat-6.0.29\webapps\ROOT\html\taglib\ui\language folder. (On Line number 80 )

Note :Remember by doing change in this means you are change something which will reflect on whole portal emoticon

Thanks,
Sagar Vyas
ruchi gupta
RE: modify long text under language portlet
2011/11/06 21:22
答え

ruchi gupta

ランク: New Member

投稿: 12

参加年月日: 2011/07/31

最近の投稿

Thanks Sagar.
Rojalin Patri
RE: modify long text under language portlet
2012/03/15 22:23
答え

Rojalin Patri

ランク: Expert

投稿: 287

参加年月日: 2011/03/22

最近の投稿

Hi Ruchi and Sagar,
i have a similar requirement and i too want to remove the country name from the display list.i tried but could n't figure out which part i should remove to so that country name won't come with the language name in the drop down list.
Ruchi:please mention how did you achieve this.

Thanks and Regards
Rojalin