CodeIgniter Forums
Seo url and multilanguage - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Best Practices (https://forum.codeigniter.com/forumdisplay.php?fid=12)
+--- Thread: Seo url and multilanguage (/showthread.php?tid=74835)



Seo url and multilanguage - togrul614 - 11-13-2019

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?


RE: Seo url and multilanguage - ciadmin - 11-13-2019

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


RE: Seo url and multilanguage - loopzzz - 11-15-2019

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


RE: Seo url and multilanguage - christaelrod - 12-26-2019

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


RE: Seo url and multilanguage - InsiteFX - 12-29-2019

Lango is coyyrighted and was sold on Code Canyon