Welcome Guest, Not a member yet? Register   Sign In
Seo url and multilanguage
#1

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?
Reply
#2

Not sure how Wordpress might handle this, but an example using the {locale} routing segment is in https://github.com/codeigniter4projects/website2
Reply
#3

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
Reply
#4

Try using "Lango - Codeigniter Multilingual Script" it might be useful for you.
Reply
#5

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 )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB