留言板

RSS Translation

thumbnail
Jacques Traore,修改在10 年前。

RSS Translation

Junior Member 帖子: 49 加入日期: 13-1-21 最近的帖子
Hi there,
I am looking for a way to change the source of a rss feed depending whenever the current language is French or English. The RSS portlet's configuration tool does not allow this.
Lets say if English, the feed's URL should be something like this "http://xxx.com/feed" and if current language is French then the URL must be "http://xxx.com/fr/feed".
I am using Lieray 6.1.1 CE with tomcat and Oracle.
thumbnail
Jose Jiménez,修改在10 年前。

RE: RSS Translation

Regular Member 帖子: 176 加入日期: 12-8-23 最近的帖子
Hi Jacques,

Have you tried changing the value of the property locale.prepend.friendly.url.style in your portal-ext.properties?

With locale.prepend.friendly.url.style=2, If they are URL generated by the portal, automatically redirects from "http://xxx.com/feed" to "http://xxx.com/fr/feed". However the configuration doesn't allow this multilanguage-url configuration feature.

#
# Set this to 0 if the locale is not automatically prepended to a URL. This
# means that each URL could potentially point to many different languages.
# For example, the URL http://localhost:8080/web/guest/home could then be
# viewed by users in many different languages.
#
# Set this to 1 if the locale is automatically prepended to a URL when the
# requested locale is not the default locale. This means that each URL
# points to just one language. For example, the URL
# http://localhost:8080/web/guest/home would point to the default language.
# The URL http://localhost:8080/zh/web/guest/home and
# http://localhost:8080/zh_CN/web/guest/home would both point to the Chinese
# language.
#
# In cases where the prepended locale is "zh" and not complete locale
# "zh_CN", then the full locale returned will be based on the order in which
# the locales appear in the property "locales". If "zh_CN" appears before
# "zh_TW", then "zh" will be a short hand for "zh_TW".
#
# The default language is set in system.properties with the properties
# "user.country" and "user.language".
#
# Set this to 2 if the locale is automatically prepended to every URL. This
# means that each URL points to just one language.
#
# Note that each language requires an entry in the property "locales" and a
# servlet mapping in web.xml for the I18n Servlet.
#
locale.prepend.friendly.url.style=1


Regards
Jose