SquirrelMail internal gettext functions

Alternate to the system's built-in gettext. Relies on .po files (can't read .mo easily). Uses the session for caching (speed increase). Possible use in other PHP scripts? The only SM-specific thing is $sm_language, I think.

require_once (SM_PATH.'functions/global.php') (line 20)

Almost everything requires global.php...

bindtextdomain (line 218)

Alternative php bindtextdomain function

Sets path to directory containing domain translations

string bindtextdomain (string $name, string $dir)
  • string $name: gettext domain name
  • string $dir: directory that contains all translations
gettext_php_load_strings (line 58)

Converts .po file into array and stores it in session.

Used internally by _($str) function

void gettext_php_load_strings ()
textdomain (line 242)

Alternative php textdomain function

Sets default domain name

string textdomain ([string $name = false])
  • string $name: gettext domain name
_ (line 160)

Alternative php gettext function (short form)

string _ (string $str)
  • string $str: English string

Documentation generated on Mon, 20 Feb 2017 04:28:11 +0100 by phpDocumentor 1.4.3