I’m researching hours and hours, but I could not find any clear, efficient way to make it :/
I have a codeigniter base website in English and I have to add a Polish language now. What is the best way to make my site in 2 language depending visitor selection?
is there any way to create array files for each language and call them in view files depends on Session from lang selection? I don’t wanna use database.
Appreciate helps! I’m running out of deadline :/ thanks!!
Have you seen CodeIgniter’s Language library?
In your case…
polish_lang.phpandenglish_lang.phpinsideapplication/language/polish$lang['hello'] = "Witaj";$this->lang->load('polish_lang', 'polish');$this->lang->line('hello');Just store the return value of this function in a variable so you can use it in your view.Repeat the steps for the english language and all other languages you need.