GiriGiriPHP
home | about | download | how to


Flattr this
How to add a language
languages/ folder in installation root.
Just copy the existing english.php, and save it as the name of your new language file. Say, newlanguage.php. Then, translate all the text values contained in that file to the desired language.

Then, you can set the default language of the system to that language in includes/application_top.php, by changing references of the word 'english' to 'newlanguage', at the if routine that assigns cookies for language files.

You would need to duplicate this act, for each module in their languages/ folder, for each language. Since the modules are contained with their own language files.

GiriGiri serves different languages in virtual language subdirectories appended to the request url by mod_rewrite. So, for every language you added, you will need to add the 2 letter ISO code of that language to the htaccess values that are present for languages, in .htaccess file.

You shouldnt just put in your content in a certain language in .tpl files. The tpl files are there for visuals of the website. All content should be either kept in language variables, or, database (through modules you may add).