留言板

How to specify how Language Context is shown in URL?

Klaus Bachmaier,修改在8 年前。

How to specify how Language Context is shown in URL?

Regular Member 帖子: 223 加入日期: 13-9-30 最近的帖子
I have two very similar servers, which where initially set up using the same DB-Dump, and both are using very similar portal-ext.properties files, which only differ in their Database Connection Settings. On one of these servers URL's for foreign Language Contents are shown like http://myserver.com/en_US/web/guest/home, and on the other Server these URLs show up like http://myserver.com/en/web/guest/home. I don't get it where the Difference comes from. I already played around with any possible settings for "locale.prepend.friendly.url.style" in portal-ext.properties, but because both servers haven't had this setting initially in their portal-ext.properties, I don't think that's the cause for the difference. So how and where could I specify that foreign Language URL's should only use the short form of the locales like "de" instead of "de_DE"?
thumbnail
Jorge Díaz,修改在8 年前。

RE: How to specify how Language Context is shown in URL?

Liferay Master 帖子: 753 加入日期: 14-1-9 最近的帖子
You can use locale.prepend.friendly.url.style at portal.properties. See more info at: https://docs.liferay.com/portal/6.2/propertiesdoc/portal.properties.html#Languages%20and%20Time%20Zones

Both servers have same CE version or EE fixpack?

There are two recent bugs related with that functionality, check them:
Klaus Bachmaier,修改在8 年前。

RE: How to specify how Language Context is shown in URL?

Regular Member 帖子: 223 加入日期: 13-9-30 最近的帖子
Thanks Jorge!

Yes, I know about the locale.prepend.friendly.url.style settings, but as I wrote in my first Post I've already played around with it without success.

But I checked the Pachlevel of both Servers and found out, that the one which is working as expected is still on Portal 45 Fixpack, while the strange behaving Server is on Fixpack Portal 77. So yes, could be that I'm a "Victim" of something Introduced in one of the latest Fixpacks. I don't think it's related to LPS-60313 as I've never used locale.prepend.friendly.url.style in my properties Files before this Problem appeared.

That means: Sit and wait! Right?
Klaus Bachmaier,修改在8 年前。

RE: How to specify how Language Context is shown in URL?

Regular Member 帖子: 223 加入日期: 13-9-30 最近的帖子
OK, I patched both Servesr to Fixpack 81, and the Problem seems to be gone.
thumbnail
Jorge Díaz,修改在8 年前。

RE: How to specify how Language Context is shown in URL?

Liferay Master 帖子: 753 加入日期: 14-1-9 最近的帖子
Klaus Bachmaier:
But I checked the Pachlevel of both Servers and found out, that the one which is working as expected is still on Portal 45 Fixpack, while the strange behaving Server is on Fixpack Portal 77. So yes, could be that I'm a "Victim" of something Introduced in one of the latest Fixpacks. I don't think it's related to LPS-60313 as I've never used locale.prepend.friendly.url.style in my properties Files before this Problem appeared.

That means: Sit and wait! Right?


Hi Klaus Bachmaier,

If you are a gold or platinum customer, you should open a ticket in LESA: Your bug will be investigated and a hotfix will be delivered (if it is necessary)
If you are a limited customer, your options are:
  • Investigate the problem by your own and search for a LPS ticket about you issue. Open a new one if you don't find any.
  • If your LPS is reproduced by most of the customers, it will be prioritized, fixed and added to a fixpack, but there is no guarantee to be fixed and included to a fixpack.
  • Update to last fixpack in order to get latest corrections

If you are a community user, your options are:
  • Updated to latest published GA
  • Wait for a new GA or a new major Liferay version
  • Download Liferay code and fix it by your own
Klaus Bachmaier,修改在8 年前。

RE: How to specify how Language Context is shown in URL?

Regular Member 帖子: 223 加入日期: 13-9-30 最近的帖子
Patched both Servers to Fixpack 81 and the problem is gone! emoticon
thumbnail
Aritz Galdos,修改在6 年前。

RE: How to specify how Language Context is shown in URL?

Expert 帖子: 416 加入日期: 07-5-15 最近的帖子
Ummm
Facing the same problem here. And I haves just installed Liferay 6.2 GA6
Any clue?
Prashant Sharma,修改在6 年前。

RE: How to specify how Language Context is shown in URL?

New Member 帖子: 24 加入日期: 14-7-14 最近的帖子
Aritz Galdos:
Ummm
Facing the same problem here. And I haves just installed Liferay 6.2 GA6
Any clue?


Hi ALL,

Facing the similar issue in LR 6.2 CE GA6.
Actually i m working on Migration from LR6.1 to LR6.2 CE GA6 and for $sign_out_url the values get differ.
LR 6.1 CE --> $sign_out_url = "/en/c/portal/logout"
LR 6.2 CE GA6 --> $sign_out_url = "/en_US/c/portal/logout"

Need to remove '_US', dont know how. Also could anyone let me know how language context has been added in URL.
@Aritz : Have you found any solution related to this.

Please let me know if there is any workaround for 6.2 GA6

Regards
Prashant Sharma
thumbnail
Aritz Galdos,修改在6 年前。

RE: How to specify how Language Context is shown in URL?

Expert 帖子: 416 加入日期: 07-5-15 最近的帖子
Hi,

The fast solution for me was to re-compile portal-impl.jar from source after modifying some two files.

here they go.

Hope that helps.
Prashant Sharma,修改在6 年前。

RE: How to specify how Language Context is shown in URL?

New Member 帖子: 24 加入日期: 14-7-14 最近的帖子
Aritz Galdos:
Hi,

The fast solution for me was to re-compile portal-impl.jar from source after modifying some two files.

here they go.

Hope that helps.


Hey Aritz,
Thanks for your quick response. I would check the required changes and get back to you soon.
--->
As i now , to make the changes in portal-impl classes its required to create an ext-plugin.
Is it possible to make the changes with out using ext. If so please let me know

Thanks in Advance.

Regards
Prashant Sharma
Prashant Sharma,修改在6 年前。

RE: How to specify how Language Context is shown in URL?

New Member 帖子: 24 加入日期: 14-7-14 最近的帖子
Hi Aritz,

Could you please provide me with your modified portal-impl.jar as am not able to re compile the files on my end.
As a solution i had done the changes in my customized code but it again created issue on different site pages. Would it be possible for you to share me with the modified jar file. ufffemoticon fed up.

Thanks in Advance

Regards
Prashant Sharma