CodeIgniter Forums
Multilanguage - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Best Practices (https://forum.codeigniter.com/forumdisplay.php?fid=12)
+--- Thread: Multilanguage (/showthread.php?tid=72650)



Multilanguage - pippuccio76 - 01-18-2019

Hi ,sorry for english ,  i see this tutorial to implement multilanguage :

https://www.codexworld.com/multi-language-implementation-in-codeigniter/

My answer is , must i create a single file for every language or multiple file ?

If i create multiple file how can i switch ?


RE: Multilanguage - ciadmin - 01-18-2019

Yes, multiple files per language, each language in its own subfolder beneath application/language.

The article you mention shows three ways to switch between them, and they look reasonable.


RE: Multilanguage - pippuccio76 - 01-18-2019

(01-18-2019, 01:30 PM)ciadmin Wrote: Yes, multiple files per language, each language in its own subfolder beneath application/language.

The article you mention shows three ways to switch between them, and they look reasonable.

if i create mltiple file language , how can i import automatically ?

In my application alwais i do in every method of controller:


PHP Code:
$data['title_site'] ='Site title' 


in header i have :
PHP Code:
  <title><?= $title_site ?></title> 


How can i change depends on language ?


Another quetion , how can i change the form_validation message error?