Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Let's allow packages to setup the active locale #1375

Closed
wants to merge 1 commit into from

Conversation

mlocati
Copy link
Contributor

@mlocati mlocati commented Sep 19, 2013

THIS IS JUST A THINK-ABOUT PULL REQUEST

The file /concrete/config/localization.php defines some locale-dependant constants.
But at that moment the active locale is the website default one, not the page-specific one.
Let's ask the installed packages to set the ACTIVE_LOCALE on a per-page basis.

Related multilingual pull request: concretecms/addon_internationalization#39

The file /concrete/config/localization.php defines some locale-dependant constants.
But at that moment the active locale is the website default one, not the page-specific one.
Let's ask the installed packages to set the ACTIVE_LANGUAGE on a per-page basis.
@mlocati
Copy link
Contributor Author

mlocati commented Sep 20, 2013

This is a potential alternative to concretecms/concretecms#1381

@mkly
Copy link
Contributor

mkly commented Sep 20, 2013

These are interesting ideas. I'm going to take a closer look early next week.

@Remo
Copy link
Contributor

Remo commented Sep 22, 2013

This PR would change a small behaviour. The language returned by $u->getUserDefaultLanguage() currently wins over the multilingual add-on. That means that every part of a site is currently in Italian if you have selected it as your default language. When you load the multilingual add-on earlier, it would win over $u->getUserDefaultLanguage().

To me, this "new" behaviour would even be better, but I guess that's up for discussion. It's what I currently have in our custom fork.

Background: You have a site with a couple of forms [t() strings in the frontend output]. When I now select "German" as my default language, I won't be able to see the correct form block output if I navigate to /it/form..

I thought about filing a bug report for this but you know...

In short: I'd prefer what this PR does over the current behaviour but it's different. Just thought I'd point it out..

@Remo
Copy link
Contributor

Remo commented Jul 22, 2014

@mlocati I'm going to close this, the one that imho matters the most at this point is concretecms/addon_internationalization#47 Let's see if we can get it merged..

@Remo Remo closed this Jul 22, 2014
@mlocati mlocati deleted the fix-localization-defines branch February 1, 2016 13:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants