Foros de discusión

How to use different languages for pages and control panel?

thumbnail
Alex Pierce, modificado hace 7 años.

How to use different languages for pages and control panel?

New Member Mensajes: 12 Fecha de incorporación: 30/11/16 Mensajes recientes
Hi!
I started developing theme for Liferay 7. I want to use English language for Control Panel, regardless of the user's locale. But site pages should be displayed on the user's language. Is there such possibility?
thumbnail
Andrew Jardine, modificado hace 7 años.

RE: How to use different languages for pages and control panel?

Liferay Legend Mensajes: 2416 Fecha de incorporación: 22/12/10 Mensajes recientes
Hi Alex,

I'm not aware of any configuration that does this but I had to do something similar in the past for a client where they had two distinct urls for the same portal instance. The url host determined the language that the page should be displayed in .. so we wrote a servlet filter hook that would detect the host, infer the language, and then set the places that Liferay looks for language based on the host. You could probably use the same technique by looking for "/group/control_panel" in the requested url.
thumbnail
Alex Pierce, modificado hace 7 años.

RE: How to use different languages for pages and control panel?

New Member Mensajes: 12 Fecha de incorporación: 30/11/16 Mensajes recientes
Thank you for idea, Andrew!
But I hoped to do it with only configuration settings...
thumbnail
Andrew Jardine, modificado hace 7 años.

RE: How to use different languages for pages and control panel?

Liferay Legend Mensajes: 2416 Fecha de incorporación: 22/12/10 Mensajes recientes
I hear ya. Sometimes even the 4 million config the Liferay does provide doesn't include the thing you need emoticon.

You could make a control panel portlet that allows you to set the language for the control panel and then reference the setting in your hook --- then it would be configurable, and you could share it with others via the marketplace ;)