CodeIgniter4 icon indicating copy to clipboard operation
CodeIgniter4 copied to clipboard

Missing function locale_set_default(...) in Codeigniter 4

Open Ansulsingkang opened this issue 5 years ago • 3 comments

try to change in /system/Codeignater.php line 184 locale_set_default($this->config->defaultLocale ?? 'en');

become:

if( function_exists('locale_set_default' ) ) :
    locale_set_default($this->config->defaultLocale ?? 'en');
    endif;

Originally posted by @Ansulsingkang in https://github.com/codeigniter4/CodeIgniter4/issues/3171#issuecomment-734558338

Ansulsingkang avatar Dec 02 '20 08:12 Ansulsingkang

That is a hack and won't be accepted. Please install intl and its dependencies for the function to work.

paulbalandan avatar Dec 02 '20 10:12 paulbalandan

Can you show us how to install it in cpanel?

Ansulsingkang avatar Dec 02 '20 16:12 Ansulsingkang

You should ask your cpanel provider if intl is installed. Then in your custom php.ini add the line extension=intl.

paulbalandan avatar Dec 02 '20 20:12 paulbalandan