Seo url and multilanguage |
Hello,
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 https://github.com/codeigniter4projects/website2
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
Try using "Lango - Codeigniter Multilingual Script" it might be useful for you.
Lango is coyyrighted and was sold on Code Canyon
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |