translate.php File Reference

Go to the source code of this file.

Namespaces

namespace  MythWeb

$L

array $GLOBALS['L']

/*

global $L = array()
 t ($str)
 Returns $str, translated appropriately /*.
 tn ()
 return different translated strings based on the numerical value of int.
 load_translation ($path)
 Load a translation file into the global translation array.
 get_browser_lang ()
 The get_browser_lang function is modified from Wouter Verhelst's source.

Variables

$Languages
array $GLOBALS['Languages']

/*

global $Languages = array()
 $Languages ['Catalan'] = array('Català', 'ca_ES.UTF-8', 'ca_ES')
 $Languages ['Dutch'] = array('Nederlands', 'nl_NL', array('nl_NL', 'nl_BE'))
 $Languages ['English'] = array('English', 'en_US.UTF-8', 'en_US.ISO-8859-1')
 $Languages ['English_GB'] = array('English_GB', 'en_GB.UTF-8', 'en_GB.ISO-8859-1')
 $Languages ['French'] = array('Français', 'fr_FR.UTF-8', 'fr_FR')
 $Languages ['Japanese'] = array('Japanese', 'ja_JP.UTF-8', 'ja_JP')
 $Languages ['Spanish'] = array('Español', 'es_ES.UTF-8', 'es_ES')
 $Languages ['Swedish'] = array('Svenska', 'sv_SE.UTF-8', 'sv_SE')
 $Languages ['Danish'] = array('Dansk', 'da_DK.UTF-8', 'da_DK')
 $Languages ['German'] = array('Deutsch', 'de_DE', 'de_DE')
 $Languages ['Slovenian'] = array('Slovensko', 'si_SI', 'sl_SI')
 $Languages ['Finnish'] = array('Suomi', 'fi_FI.UTF-8', 'fi_FI')
 $Languages ['Czech'] = array('Czech', 'cs_CZ.UTF-8', 'cs_CZ.UTF-8')
 $Languages ['Polski'] = array('Polish', 'pl_PL.UTF-8', 'pl_PL')


Function Documentation

t ( str  ) 

Returns $str, translated appropriately /*.

Definition at line 90 of file translate.php.

tn (  ) 

return different translated strings based on the numerical value of int.

an optional array of string arguments can be included and will be passed to t() for interpretation. If no array is passed in, a default will be created using the value of t(int). /*

Definition at line 136 of file translate.php.

Referenced by OnExpire().

load_translation ( path  ) 

Load a translation file into the global translation array.

Parameters:
string $path The path to the translation file /*

Definition at line 157 of file translate.php.

get_browser_lang (  ) 

The get_browser_lang function is modified from Wouter Verhelst's source.

Relevant documentation from his code is included below.

accept-to-gettext.inc -- convert information in 'Accept-*' headers to gettext language identifiers. Copyright (c) 2003, Wouter Verhelst <wouter@debian.org>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Assumptions made: * Charset encodings are written the same way as the Accept-Charset HTTP header specifies them (RFC2616), except that they're parsed case-insensitive. * Country codes and language codes are the same in both gettext and the Accept-Language syntax (except for the case differences, which are dealt with easily). If not, some input may be ignored. * The language is more important than the charset; i.e., if the following is given:

Accept-Language: nl-be, nl;q=0.8, en-us;q=0.5, en;q=0.3 Accept-Charset: ISO-8859-15, utf-8;q=0.5

And the supplied parameter contains (amongst others) nl_BE.UTF-8 and nl.ISO-8859-15, then nl_BE.UTF-8 will be picked.

/*

Definition at line 217 of file translate.php.


Variable Documentation

$Languages = array()

Definition at line 34 of file translate.php.

$Languages['Catalan'] = array('Catal&agrave;', 'ca_ES.UTF-8', 'ca_ES')

Definition at line 40 of file translate.php.

$Languages['Dutch'] = array('Nederlands', 'nl_NL', array('nl_NL', 'nl_BE'))

Definition at line 41 of file translate.php.

$Languages['English'] = array('English', 'en_US.UTF-8', 'en_US.ISO-8859-1')

Definition at line 42 of file translate.php.

$Languages['English_GB'] = array('English_GB', 'en_GB.UTF-8', 'en_GB.ISO-8859-1')

Definition at line 43 of file translate.php.

$Languages['French'] = array('Fran&ccedil;ais', 'fr_FR.UTF-8', 'fr_FR')

Definition at line 44 of file translate.php.

$Languages['Japanese'] = array('Japanese', 'ja_JP.UTF-8', 'ja_JP')

Definition at line 45 of file translate.php.

$Languages['Spanish'] = array('Espa&ntilde;ol', 'es_ES.UTF-8', 'es_ES')

Definition at line 46 of file translate.php.

$Languages['Swedish'] = array('Svenska', 'sv_SE.UTF-8', 'sv_SE')

Definition at line 47 of file translate.php.

$Languages['Danish'] = array('Dansk', 'da_DK.UTF-8', 'da_DK')

Definition at line 48 of file translate.php.

$Languages['German'] = array('Deutsch', 'de_DE', 'de_DE')

Definition at line 49 of file translate.php.

$Languages['Slovenian'] = array('Slovensko', 'si_SI', 'sl_SI')

Definition at line 50 of file translate.php.

$Languages['Finnish'] = array('Suomi', 'fi_FI.UTF-8', 'fi_FI')

Definition at line 51 of file translate.php.

$Languages['Czech'] = array('Czech', 'cs_CZ.UTF-8', 'cs_CZ.UTF-8')

Definition at line 52 of file translate.php.

$Languages['Polski'] = array('Polish', 'pl_PL.UTF-8', 'pl_PL')

Definition at line 53 of file translate.php.

$L = array()

Definition at line 65 of file translate.php.


Generated on Sat Dec 18 05:15:56 2010 for MythTV by  doxygen 1.5.5