You are here

function i18n_get_lang in Internationalization 5

Same name and namespace in other branches
  1. 5.2 i18n.module \i18n_get_lang()
  2. 6 i18n.module \i18n_get_lang()

This one expects to be called first from common.inc

22 calls to i18n_get_lang()
i18nblocks_block in i18nblocks/i18nblocks.module
Implementation of hook_block()
i18nprofile_categories in i18nprofile/i18nprofile.module
Returns translated categories
i18nprofile_fields in i18nprofile/i18nprofile.module
Returns field translations
i18nprofile_view_profile in i18nprofile/i18nprofile.module
Show user profile with translated fields and categories
i18n_db_rewrite_where in ./i18n.module
Rewrites queries depending on rewriting mode

... See full list

File

./i18n.module, line 25
Internationalization (i18n) module

Code

function i18n_get_lang($setlanguage = NULL) {
  static $i18n_language;

  //see if the language is already set.
  if ($setlanguage) {
    $i18n_language = $setlanguage;
  }
  elseif ($i18n_language) {
    return $i18n_language;
  }
  else {
    _i18n_init();
    return $i18n_language = _i18n_get_lang();
  }
}