Foren

[Solved]LR- 6.0.6 - Language portlet - English / URL issue

thumbnail
Ahamed Sakir, geändert vor 11 Jahren.

[Solved]LR- 6.0.6 - Language portlet - English / URL issue

Regular Member Beiträge: 129 Beitrittsdatum: 22.08.08 Neueste Beiträge
Hi All,
When i click on any languages then URL is coming with language except ENGLISH. how to append language for english in URL like (http://localhost:8080/en_US/web/guest)

English - http://localhost:8080/web/guest (Without language)
Arabic - http://localhost:8080/ar/web/guest
Hindi - http://localhost:8080/hi/web/guest
Urdu - http://localhost:8080/ur/web/guest


Regards
Sakir
thumbnail
Jignesh Vachhani, geändert vor 11 Jahren.

RE: LR- 6.0.6 - Language portlet - English / URL issue

Liferay Master Beiträge: 803 Beitrittsdatum: 10.03.08 Neueste Beiträge
Hi Ahmed,
It happens because your default language is en(US).

In liferay there is one property which can help you .

locale.prepend.friendly.url.style=1


bydefault it is set to 1.

So please set it to 2 .

locale.prepend.friendly.url.style=2

you can read below comment

    #
    # 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.
    #
thumbnail
Ahamed Sakir, geändert vor 11 Jahren.

RE: LR- 6.0.6 - Language portlet - English / URL issue

Regular Member Beiträge: 129 Beitrittsdatum: 22.08.08 Neueste Beiträge
Thanks Jignesh Vachhani . Working fine.........................

Regards
Sakir
thumbnail
Jignesh Vachhani, geändert vor 11 Jahren.

RE: LR- 6.0.6 - Language portlet - English / URL issue

Liferay Master Beiträge: 803 Beitrittsdatum: 10.03.08 Neueste Beiträge
That's nice Ahmed, Please change thread status to answered which would help other community members.