Welcome Guest, Not a member yet? Register   Sign In
Switch system language

I'm using CodeIgniter 3.0. I'm writing a multilingual website. The website is not text-heavy, so it was not much work using the Language class and the documentation on the internet is plenty. However, what I was unable to find is documentation on switching the system language.

In config.php I have set the language to 'english'. This means that if my user sets a different language the system messages, e.g., from form validation, are still in English. How can I switch the language for those type of messages?

Generally, you just have to get the user's language selection early enough to set the language, or reload any language files which are loaded previous to your retrieval of that selection.

PHP Code:

Thanks. The combination of both answers was exactly what I needed.

Theme © iAndrew 2016 - Forum software by © MyBB