CodeIgniter Forums
[split] Multi-language support (Project Update 2019.01.04) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forum-31.html)
+--- Thread: [split] Multi-language support (Project Update 2019.01.04) (/thread-73221.html)



[split] Multi-language support (Project Update 2019.01.04) - primadonna - 04-01-2019

Will CI 4 support multiple languages via url out of the box?

Something like:



Code:
exmaple.com/en-US/controler
exmaple.com/en-GB/controler
exmaple.com/pl-PL/controler

or:
Code:
exmaple.com/en/controler
exmaple.com/pl/controler



RE: [split] Multi-language support (Project Update 2019.01.04) - ciadmin - 04-01-2019

Already there. https://codeigniter4.github.io/CodeIgniter4/outgoing/localization.html#in-routes


RE: [split] Multi-language support (Project Update 2019.01.04) - quasiperfect - 05-16-2019

hi

what about
Code:
exmaple.com/en/books/
exmaple.com/it/libri/

?


RE: [split] Multi-language support (Project Update 2019.01.04) - ciadmin - 05-16-2019

(05-16-2019, 04:07 AM)quasiperfect Wrote: hi

what about
Code:
exmaple.com/en/books/
exmaple.com/it/libri/

?

The post just above yours mentions the localization in routes, which has the example "http://example.com/fr/books".
Doesn't this already answer your question? What isn't clear?


RE: [split] Multi-language support (Project Update 2019.01.04) - primadonna - 05-20-2019

Probably not, because what he is talking about is that in English it's 'books' but in Italian its 'libri' - here both pointing to the same thing.


RE: [split] Multi-language support (Project Update 2019.01.04) - ciadmin - 05-20-2019

ahhh - I didn't catch that, thanks.
@quasiperfect You could setup routing rules to achieve that, sort of, mapping "books" and "libri" to the same handler regardless of language, but if that is to happen on a language basis, you might have to set up routing groups, one per language.