组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Vladimir Vukadinovic
Available languages display names
2011年9月14日 上午6:46
答复

Vladimir Vukadinovic

等级: New Member

帖子: 24

加入日期: 2008年10月10日

最近的帖子

Hi,

What is the best way to change available languages display names in language portlet. For example Српски (Serbia) to Srpski (Serbia) or so on.

Thanks
Vladimir
Thiago Leão Moreira
RE: Available languages display names
2011年9月14日 上午8:20
答复

Thiago Leão Moreira

LIFERAY STAFF

等级: Liferay Legend

帖子: 1433

加入日期: 2007年10月10日

最近的帖子

Hey Vladimir,

You can use the following properties to set this configuration

 1##
 2## Languages and Time Zones
 3##
 4
 5    #
 6    # Specify the available locales. Messages corresponding to a specific
 7    # language are specified in properties files with file names matching that
 8    # of content/Language_*.properties. These values can also be overridden in
 9    # properties files with file names matching that of
10    # content/Language-ext_*.properties. Use a comma to separate
11    # each entry.
12    #
13    # If there is more than one locale for the same language, the first one in
14    # the list will be used when a translation is requested in another locale of
15    # the same language but a translated value cannot be found. For example, if
16    # there are two locales such us pt_BR and pt_PT (in this order), any key not
17    # found in pt_PT will be looked for in pt_BR.
18    #
19    # All locales must use UTF-8 encoding.
20    #
21    # See the following links specifiy language and country codes:
22    #     http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt
23    #     http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html
24    #
25    locales=ar_SA,eu_ES,bg_BG,ca_AD,ca_ES,zh_CN,zh_TW,hr_HR,cs_CZ,nl_NL,nl_BE,en_US,en_GB,et_EE,fi_FI,fr_FR,gl_ES,de_DE,el_GR,iw_IL,hi_IN,hu_HU,in_ID,it_IT,ja_JP,ko_KR,nb_NO,fa_IR,pl_PL,pt_BR,pt_PT,ro_RO,ru_RU,sr_RS,sr_RS_latin,sl_SI,sk_SK,es_ES,sv_SE,tr_TR,uk_UA,vi_VN
Hitoshi Ozawa
RE: Available languages display names
2011年9月14日 下午3:29
答复

Hitoshi Ozawa

等级: Liferay Legend

帖子: 7949

加入日期: 2010年3月23日

最近的帖子

I've answered this question just a couple of days ago in the thread below:
http://www.liferay.com/ja/community/forums/-/message_boards/message/10657200
Vladimir Vukadinovic
RE: Available languages display names
2011年9月15日 上午2:53
答复

Vladimir Vukadinovic

等级: New Member

帖子: 24

加入日期: 2008年10月10日

最近的帖子

Thanks,

I solved this problem on way that I changed code in page.jep for Language portlet. In my case I only wanted to change Cyrillic to Latin display name for serbian language. In first time I think that there are any special code table in database or properties files. My solution is
 1<c:choose>
 2                    <c:when test='<%= (locales[i].getLanguage().equals(\"sr\") )%>'>
 3                            <%= "Srpski" %>
 4                      </c:when>
 5                      <c:otherwise>
 6                             <%= language %>
 7                       </c:otherwise>
 8                   </c:choose>
 9
10      <!--<%= language %>-->


Regards
Vladimir
Hitoshi Ozawa
RE: Available languages display names
2011年9月15日 上午4:21
答复

Hitoshi Ozawa

等级: Liferay Legend

帖子: 7949

加入日期: 2010年3月23日

最近的帖子

That'll change the name of the language displayed in the portlet.
I may have went to far to change the language name on all occurrances.emoticon
Vladimir Vukadinovic
RE: Available languages display names
2011年9月15日 上午6:59
答复

Vladimir Vukadinovic

等级: New Member

帖子: 24

加入日期: 2008年10月10日

最近的帖子

Yes, I only wanted to change name of the language displayed, but your post is use full of course.