Welcome Guest, Not a member yet? Register   Sign In
Check if my codeigniter 4 runs in multilingual mode.
#1
Exclamation 
(This post was last modified: 05-09-2021, 01:30 PM by sdiri.)

Hi, How do I know if CI4 is running in multilingual mode?
in other words how to know if segment 1 of url presents the key of the language not another variable?
because the methode 
PHP Code:
$this->request->getLocale() 
always returns the a value ...
if no language key founded it return the default value of:
PHP Code:
$defaultLocale 
In this casenothing guarantees me that the returned value corresponds to a key of a languagecontroller or if the site works in multilungue mode or not.
I think even if I use 
PHP Code:
$this->request->getLocale() in_array( this-> request-> config-> supportedLocales)... 
that does not give a guarantee!

Please How to be sure of my mode?

Thank you all  
Reply


Messages In This Thread
Check if my codeigniter 4 runs in multilingual mode. - by sdiri - 05-05-2021, 03:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB