掲示板

Available languages display names

thumbnail
12年前 に Vladimir Vukadinovic によって更新されました。

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
12年前 に Thiago Leão Moreira によって更新されました。

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
12年前 に Hitoshi Ozawa によって更新されました。

RE: Available languages display names

Liferay Legend 投稿: 7942 参加年月日: 10/03/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
12年前 に Vladimir Vukadinovic によって更新されました。

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
12年前 に Hitoshi Ozawa によって更新されました。

RE: Available languages display names

Liferay Legend 投稿: 7942 参加年月日: 10/03/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
12年前 に Vladimir Vukadinovic によって更新されました。

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.