contenido\includes\functions.i18n.php

Show: PublicProtectedPrivateinherited
    Table of Contents
    Project: Contenido Content Management System

    Description: Contenido i18n Functions

    Requirements:

    Author
    Timo A. Hummel  
    Con_php_req
    5.0  
    Copyright
    four for business AG  
    License
    http://www.contenido.org/license/LIZENZ.txt  
    Link
    http://www.4fb.de  
    Link
    http://www.contenido.org  
    Package
    Contenido Backend includes  
    Since
    file available since contenido release <= 4.6 {@internal created 2003-07-03 modified 2008-06-26, Frederic Schneider, add security fix modified 2012-01-17, Mischa Holz, removed hessisch $Id: functions.i18n.php 1780 2012-01-17 11:08:24Z mischa.holz $: }}  
    Version
    1.2.8  

    Functions

    functioni18n( $string,  $domain = "contenido") : string

    i18n($string)

    gettext wrapper (for future extensions). Usage: i18n("Your text which has to be translated");

    Parameters
    NameTypeDescription
    $string

    string The string to translate

    $domain

    string The domain to look up

    Returns
    TypeDescription
    stringReturns the translation
    functioni18nEmulateGettext( $string,  $domain = "contenido") : string

    i18nEmulateGettext()

    Emulates GNU gettext

    Parameters
    NameTypeDescription
    $string

    string The string to translate

    $domain

    string The domain to look up

    Returns
    TypeDescription
    stringReturns the translation
    functioni18nGetAvailableLanguages() : array

    i18nGetAvailableLanguages()

    Returns the available_languages array to prevent globals.

    Returns
    TypeDescription
    arrayAll available languages
    functioni18nInit( $localePath,  $langCode) : string

    i18nInit()

    Initializes the i18n stuff.

    Parameters
    NameTypeDescription
    $localePath

    string Path to the locales

    $langCode

    string Language code to set

    Returns
    TypeDescription
    stringReturns the translation
    functioni18nMatchBrowserAccept( $accept) : string

    i18nMatchBrowserAccept($accept)

    Tries to match the language given by $accept to one of the languages in the system.

    Parameters
    NameTypeDescription
    $accept
    Returns
    TypeDescription
    stringThe locale key for the given accept string
    functioni18nRegisterDomain( $domain,  $localePath) : string

    i18nRegisterDomain()

    Registers a new i18n domain.

    Parameters
    NameTypeDescription
    $domain

    string Domain to bind to

    $localePath

    string Path to the locales

    Returns
    TypeDescription
    stringReturns the translation
    functioni18nStripAcceptLanguages( $accept) : array

    i18nStripAcceptLanguages($accept)

    Strips all unnecessary information from the $accept string. Example: de,nl;q=0.7,en-us;q=0.3 would become an array with de,nl,en-us

    Parameters
    NameTypeDescription
    $accept
    Returns
    TypeDescription
    arrayArray with the short form of the accept languages
    functionmi18n( $string) : void

    Parameters
    NameTypeDescription
    $string
    functiontrans( $string) : string

    trans($string)

    gettext wrapper (for future extensions). Usage: trans("Your text which has to be translated");

    Parameters
    NameTypeDescription
    $string

    string The string to translate

    Returns
    TypeDescription
    stringReturns the translation
    Documentation was generated by phpDocumentor 2.0.0a12.