Login +

Reference Guide / SLS_Lang

SLS_Lang1 is a class for handling internationalization.


At Controller level, you can access it directly by inheritance on SLS_Generic2Controller:


At others levels (PHP), you can access it by reference to SLS_Generic2:

// Or if u haven't a reference to SLS_Generic, using the singleton:

Data recovery

- If you want to retrieve all the languages in your application, you can use getSiteLangs() function:


- If you want getting the current language, you can use getLang() function:


- If you want the default language, you can use getDefaultLang() function:


- If you want to make sure that a language is active, you can use isEnabledLang() function:


Data updates

- If you want to change the current language, use setLang() function:


- If you want to reset the language detection, use the resetLang() function:


Related :


  1. SLS_Lang - Multilanguage Management
  2. SLS_Generic - Generic Class - Used eveywhere in the application