Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
srikanth velugoti
disable locale appending in url
25 febbraio 2013 1.46
Risposta

srikanth velugoti

Punteggio: Junior Member

Messaggi: 56

Data di Iscrizione: 24 aprile 2009

Messaggi recenti

Hi all ,
I am presently supporting only english language , and i dont want any locals in my url like ,

http://localhost:8080/en_GB/web/guest/home

http://localhost:8080/ar_SA/web/guest/home

I am seeing different URLs being generated by Liferay 6 on different machines . how can I force both machine's browser to render the same URL like

http://localhost:8080/web/guest/home


thanks ,
sriaknth velugoti
Siby Mathew
RE: disable locale appending in url
25 febbraio 2013 1.52
Risposta

Siby Mathew

Punteggio: Expert

Messaggi: 261

Data di Iscrizione: 4 marzo 2011

Messaggi recenti

Hi Srinkanth,
Maybe this property might help :
locale.prepend.friendly.url.style=0
Subhash Pavuskar
RE: disable locale appending in url
25 febbraio 2013 2.21
Risposta

Subhash Pavuskar

Punteggio: Regular Member

Messaggi: 234

Data di Iscrizione: 12 marzo 2012

Messaggi recenti

Hi srikanth,

There might be a localization mismatch with the two machines. Therefore, for one machine "en_GB" automatically gets attached to the URL.

Set the following property in portal-ext.properties

1locale.prepend.friendly.url.style=0 (by default it is set to 1).


Go with this Link for more portal-ext.properties Click Here

#
# 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