Is this something that Drupal 7 has in core?

Is it possible to use rules to set the language from the browser or the url?
Is this issue relevant to making the rule? Add "Language from browser" as fourth option http://drupal.org/node/958006

Comments

kars-t’s picture

Status: Active » Postponed (maintainer needs more info)

Hi,

with suns help I did patch the base functionallity of reglang in to core. So with D7 this is no problem.

To your rules question I have no real answer as I am not a rules expert. Could you please ask in their issure queue or give me more detail?

Cheers,

Karsten

kars-t’s picture

Status: Postponed (maintainer needs more info) » Fixed

Closing this due to no activity for a long time.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

bartl’s picture

You say you patched the base functionality into core, yet I still have this problem in D7 that the module did fix in D6: the mails sent back to the user are in the site default language (English; only for site maintenance) and not in the current language in which the user is browsing on the site, as it ought to be.
Can you tell me where in the admin interface I can change this setting?

bartl’s picture

Never mind, found it. For the record (thus for other people with the same problem): I had to specify the various mails as a multilingual variable in admin/config/regional/i18n/variable (why is that not the default???), after which I had to ignore the original contents of the variables, load admin/config/people/accounts once in every language, and save.

BTW There's a bug in _user_mail_text() in that variable_get ignores the language parameter, and uses the current language (NULL) instead. (It cannot be fixed because variable_get() doesn't even have a language parameter.)

kars-t’s picture

Yes that is sadly true. You would need mail_editor to get around that but the module is caught in a war about it's ownership... Hope the get along soon.

liquidcms’s picture

Status: Closed (fixed) » Active

resetting this to active as i am pretty sure it is not fixed.

a little confusing as there are dozens of posts on this (core bug) but as this module sounds as though it addresses the issue; i'll post this here first and then i guess raise a bug on core (D8, although not sure if it has been fixed in D8)

i think this module is intended to fix:
- if i am an admin and the site is currently in EN and i am adding a new user and i select that user's preferred language as FR; then the FR version of the welcome email should be used seems pretty obvious).

- currently in D7 this does not work (the emails are sent in what ever language the site is in when the admin adds the new user) - not sure what #1 refers to as this is not currently in core

- the comments in #5 (and in similar posts) about how to set the alt lang versions of these emails is only clutter and nothing to do with the issue - the issue is that the user's preferred language is not used (not how to set alt lang variables)

i think the user_mail() is likely the place where this is busted; but will need to debug a little to verify. and would be good to check if this is still a bug in D8.

as this module seems as though it worked as a work around in D6 i guess a possible status here might be "won't fix" if Kars-T has no intention of porting this to D7; but i don't think "fixed" is correct.

kars-t’s picture

Status: Active » Closed (fixed)

Hi liquidcms

I wrote this years ago. If I look at the code this module just fixes that a user gets the language set as its own that is currently active and make sure that a node gets a language set on insert. Nothing more.

So all the other cases are not fixed by this module.

I think you should open different issues about this for core or look if they are already there. Maybe talk to Gabor as he is deep into the i18n thing for D8. You can probably find him in IRC or write him a mail.

For this module I reset this to fixed as this mini module is doing what it should to and is no real fix to all i18n problems. :)

kars-t’s picture

Evil double post. And I thought Drupal was double post proof ;)