Skip to content

Language parameters

Daniel Golub edited this page Jul 1, 2014 · 2 revisions

To use language packages, edit 'app/config.php' file and enable the component in line 34.

$this->language->getString($str, $language = 'default')

Use this function inside the controller to get a string value in your desired language. The value returned is an array. If you chose language 'default', than an array of all languages will be returned, and if you specified a language, the string itself will be returned.


To pass the language strings into the view, use $data['strings'] = $this->language->getString("text").

Create new language

Create a new language by creating a file named COUNTRYCODE.stack.php inside the /app/base/Language/Stack/ folder. Inside put an array named $_strings_he which will contain a key for the string title, and a value for the string value. An example is provided by default.

Happy coding 👍