Faisal Posted January 4, 2017 Posted January 4, 2017 Hi all, I have this website project with multi-language support: English is the default language and Arabic as a secondary language. The installed language modules are: (Languages Support, Languages Support - Fields, and Languages Support - Page Names) Homepage settings: page name: "en" for English and "ar" for Arabic. So the current links are: domain.com/en is redirecting to domain.com/ for English And domain/ar for Arabic But the project owner want's to do these changes: domain.com/ act as a splash page (have website logo and language select) only. domain.com/en the English version (and make the home link go to domain.com/en insted of domain.com/) when looping the nave tree for example: echo renderTopNav($homepage->children->prepend($homepage)); domain.com/ar the Arabic version I try to bypass the redirect but I failed to do anything about it. Any help or notes making this happen is highly appreciated, Thank you.
tpr Posted January 4, 2017 Posted January 4, 2017 I guess you need to set "Yes" in "Default language homepage URL is same as root URL?" here: /admin/module/edit?name=LanguageSupportPageNames Plus adjust the Home page's url at its Settings tab (enter "en"). Then examine the url in your home template file and if it's only "domain.com" (without "/en") then show the welcome page. 1
Faisal Posted January 4, 2017 Author Posted January 4, 2017 21 minutes ago, tpr said: I guess you need to set "Yes" in "Default language homepage URL is same as root URL?" here: /admin/module/edit?name=LanguageSupportPageNames Plus adjust the Home page's url at its Settings tab (enter "en"). Then examine the url in your home template file and if it's only "domain.com" (without "/en") then show the welcome page. Thank you @tpr I have the settings exactly as you said in the first place.
Faisal Posted January 6, 2017 Author Posted January 6, 2017 I think I need to have "Default language homepage URL is same as root URL?" set to "no" in /admin/module/edit?name=LanguageSupportPageNames so that home link go to domain.com/en insted of domain.com/ when looping home children in navbar etc... Now I am trying to find out how to make domain.com/ show splash page content rather than the default content in my _out.php Append template file $pageindexurl = $_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI]; if ($pageindexurl == "/") { include_once("./_layoutspalsh.php"); // layout for splash page } else { include_once("./_layouthtml.php"); // default layout for home/lang* and all other pages } But domain.com is redirecting to domain.com/en before anything else
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now