留言板

Available languages display names

thumbnail
Vladimir Vukadinovic,修改在12 年前。

Available languages display names

New Member 帖子: 24 加入日期: 08-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
thumbnail
Thiago Leão Moreira,修改在12 年前。

RE: Available languages display names

Liferay Legend 帖子: 1449 加入日期: 07-10-10 最近的帖子
Hey Vladimir,

You can use the following properties to set this configuration

##
## Languages and Time Zones
##

    #
    # Specify the available locales. Messages corresponding to a specific
    # language are specified in properties files with file names matching that
    # of content/Language_*.properties. These values can also be overridden in
    # properties files with file names matching that of
    # content/Language-ext_*.properties. Use a comma to separate
    # each entry.
    #
    # If there is more than one locale for the same language, the first one in
    # the list will be used when a translation is requested in another locale of
    # the same language but a translated value cannot be found. For example, if
    # there are two locales such us pt_BR and pt_PT (in this order), any key not
    # found in pt_PT will be looked for in pt_BR.
    #
    # All locales must use UTF-8 encoding.
    #
    # See the following links specifiy language and country codes:
    #     http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt
    #     http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html
    #
    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
thumbnail
Hitoshi Ozawa,修改在12 年前。

RE: Available languages display names

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
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
thumbnail
Vladimir Vukadinovic,修改在12 年前。

RE: Available languages display names

New Member 帖子: 24 加入日期: 08-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
<c:choose>
                    <c:when test="<%= (locales[i].getLanguage().equals(\&quot;sr\&quot;) )%>">
                            &lt;%= "Srpski" %&gt;
                      </c:when>
                      <c:otherwise>
                             &lt;%= language %&gt;
                       </c:otherwise>
                   </c:choose>

      <!--<%= language %>-->


Regards
Vladimir
thumbnail
Hitoshi Ozawa,修改在12 年前。

RE: Available languages display names

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
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
thumbnail
Vladimir Vukadinovic,修改在12 年前。

RE: Available languages display names

New Member 帖子: 24 加入日期: 08-10-10 最近的帖子
Yes, I only wanted to change name of the language displayed, but your post is use full of course.