Thank you very much.
I dont know if we talk about the same things. I dont care now for "after registration"
Also, this sentence is not true, or maybe something different than i mean.
So 0 is the default language that is selected in the options.
My default language is 2 not 0.
My add-on will come in some days, then you can test it if you like.
The real life situation is like that:
default Language = 2
User comes to forum_home
User clicks [Register]
$visitor->language_id = 0
*checked with
echo $visitor->language_id
;
or reload page
User clicks [Register]
$visitor->language_id = 2
*checked with
echo $visitor->language_id
;
Because I need to know the language_id, i can't use it,
when it is 0, and i cant set it to 1, when it is 0; i have to set it to default (here 2)
While testing the situation, i found out to have these scenarios:
first visit
default Language = 2
page language = 2
$visitor->language_id = 0
second visit
default Language = 2
page language = 2
$visitor->language_id = 2
change language
default Language = 2
page Language = changed_id
$visitor->language_id = changed_id
Because of this, i have my solution from above.
if 0 => language_id = default_language
Is there anything wrong with my solution?
Why and in which scenario?