Index page not in primary language
Hello,
I've made changelanguage on website, everything works fine, except...
When I go to http://www.domain.com it makes the english as primary language, but I made primary website root for Slovenian language (fallback to). When you type http://www.domain.com I wan't first Slovenian than optional English, but now it is in the revers order.
Site structure is right:
Slovenian language (website root with fallback)
- domov
- storitve
English language (website root)
- home
- service
Help please.
Re: Index page not in primary language
Which page you see does not depend on changelanguage, but on your local computer configuration and Contao setup. I suppose your browser tells Contao to serve pages in english.
Re: Index page not in primary language
Hm..than the only solution is to modify the .htacces to slovenian index page (let say: /domov.html)?
Re: Index page not in primary language
There's one other sollution: Do not name the english page tree "en", but any other fancy name (eg. "xy"). This way it will never be found. However, you then need to manually assign flags to it when using changelanguage (using the "Custom language tags") option.
Re: Index page not in primary language
Ok I will give it a try and let you know.
Thanks and regards.
Re: Index page not in primary language
I've solved it with .htacces, the easy way :)
Re: Index page not in primary language [SOLVED]
Ok...I didn't solved this...because I figure it out that is not working right..
In site structure I have:
index.php (301 redirect, pointing to "domov" site structure)
Slovenian language (website root)
- domov (sencila-zaluzije.html)
- storitve
English language (website root)
- home
- service
Why it doesn't redirect me to "domov" meaning sencila-zaluzije.html when I go to domain.com? It just remains domain.com with no redirect.
It works only if I change en language to some other meaning hr, but I don't won't to make any "hacks" I really won't to know why this isn't working?
Thanks.
Re: Index page not in primary language [SOLVED]
Quote:
index.php (301 redirect, pointing to "domov" site structure)
What do you mean with that?
Re: Index page not in primary language
index.php Page type: Internal redirect, Redirect type: 301 Permanent ...., Redirect page: domov
Re: Index page not in primary language
So you created a page called "index.php" :lol:
What would you need that for? Contao is automatically detecting the incoming domain and only picking those pages.
Re: Index page not in primary language
I know that index.php doesn't have any effects, I just named it like that for no reason.
Re: Index page not in primary language
Re: Index page not in primary language
Please show us a full picture (or first 3 levels) of your page tree.
Re: Index page not in primary language
Re: Index page not in primary language
I think you should remove that index site. Why would you need that? Contao does detect what page to serve when there is a root page for the current domain.
Re: Index page not in primary language
No matter what I do with index.php the first "site structure" isn't detected in case that is not language "en". It always show the "en" site as first structure, no matter on which position it is.
Re: Index page not in primary language
If your browser is set to "en", it will show the english page. If none of the languages matches your browser, it will take the fallback. There can/should only be one fallback!
Re: Index page not in primary language
That's why I need 301 redirection when user enter the domain, cause I don't want that browser decide which language is default.
Re: Index page not in primary language
I dont think that will work then. You must assign unuseful language codes (eg. "xy") and then the user will always get the fallback page. However, you then need to manually assign the icons in changelanguage.
Re: Index page not in primary language
Hm...is this than a bug?
p.s. andreas I've send you email for developing some custom module.
Re: Index page not in primary language
No thats not a bug, root page with domain always has priority over any page outside the root tree.
Re: Index page not in primary language
Ok. thank's for your time. Let me know about the custom module.
Regards.