Localization - In routes method |
Hi everyone.
I'm trying to make multilanguage site with two languages (en, ru). In app/config default lang set as 'en'. I have a route with a locale placeholder like this: Code: $routes->get('/{locale}', 'Home::index'); When i open domain.com/ in the browser it shows me content in english. When i open domain.com/en - it gives me same content as above. when i open domain.com/en/home - it gives me same content as above The first question is how to avoid this kind of situation? And i thought if i added 'locale' placeholder , then domain.com/ should give me 404 error, but not? Why? And what is the best way to make multilanguage app in CI4? Thanks in advance.
How to set specific language for all pages in Codeigniter 4
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 |