Welcome Guest, Not a member yet? Register   Sign In
MultiLanguage and 404
#1

(This post was last modified: 07-02-2020, 10:39 AM by php_rocs.)

Hey.

I recently started using codeigniter4 and have a little MultiLanguage problem.
I have 2 languages planned on my site, English and Russian.
I followed the instructions described here.

I created translation files.
Code:
/app
    /Language
        /en
            app.php
        /ru
            app.php

My APP config:
PHP Code:
public $defaultLocale 'en';
public 
$negotiateLocale false;
public 
$supportedLocales = ['en''ru']; 

In the route I have written:
PHP Code:
$routes->get('{locale}/''Home::index'); 

When i add to route {locale} and i have trouble with 404.

Any non-existent page of the first level always gives the 200th code, like "localhost/dsa".
Any non-existent page should give the 404th code?
This problem is not observed if I do not use {locale}, 
Iit’s critical for me that each language has a unique prefix.
Sorry if I indistinctly described the problem, English is not my main language.

If you need clarifying information, I am ready to provide.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB