CodeIgniter Forums

Full Version: Seo url and multilanguage
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I have a problem with routing. I have a website in 3 languages, AZ, EN, RU. And I have dynamic pages created from admin. So I have 3 page domain/about, domain/en/about, domain/ru/about. Every slug is different depend on language. So I have another domain/jobs/etc , domain/en/jobs/etc/. and it continues like this. 

How I can do this routing like WordPress?
Not sure how Wordpress might handle this, but an example using the {locale} routing segment is in
first of all wordpress handles page translations through a plugin only (correct me if im wrong) languages are supported only for localization of interface and other static strings.

in CI you must decide the url structure to be like /{language}/page-url/page-url/...... - language and multi level nesting

what i would do is to process the URL params before the controller method is called (_remap or similar) then to pass all the page data into a single showPage($lang, array $slugs) method which will handle the nesting validation then retrieve the correct page