Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • cI18n

Functions

  • i18n
  • i18nEmulateGettext
  • i18nGetAvailableLanguages
  • i18nInit
  • i18nMatchBrowserAccept
  • i18nRegisterDomain
  • i18nStripAcceptLanguages
  • mi18n
  • trans
  • Overview
  • Package
  • Class
  • Todo
  • Download

Class cI18n

Internationalization (i18n) class.

Package: Core\I18N
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Murat Purc murat@purc.de
Located at classes/class.i18n.php
Methods summary
public static
# init( string $localePath, string $langCode, string $domain = 'contenido' )

Initializes the i18n.

Initializes the i18n.

Parameters

$localePath
Path to the locales
$langCode
Language code to set
$domain
Language domain
public static string
# __( string $string, string $domain = 'contenido' )

Returns translation of a specific text, wrapper for translate().

Returns translation of a specific text, wrapper for translate().

Parameters

$string
The string to translate
$domain
The domain to look up

Returns

string
Returns the translation
public static string
# translate( string $string, string $domain = 'contenido' )

Returns translation of a specific text

Returns translation of a specific text

Parameters

$string
The string to translate
$domain
The domain to look up

Returns

string
Returns the translation

Throws

cException
if this is the backend mode and the $belang is not set
public static string|false
# getLanguage( )

Returns the current language (if already defined)

Returns the current language (if already defined)

Returns

string|false
public static array
# getDomains( )

Returns list of registered domains

Returns list of registered domains

Returns

array
public static array
# getFiles( )

Returns list of cached tranlation files

Returns list of cached tranlation files

Returns

array
public static array
# getCache( )

Returns list of cached tranlations

Returns list of cached tranlations

Returns

array
public static
# reset( )

Resets cached translation data (language, domains, files, and cache)

Resets cached translation data (language, domains, files, and cache)

public static string
# emulateGettext( string $string, string $domain = 'contenido' )

Emulates GNU gettext

Emulates GNU gettext

Parameters

$string
The string to translate
$domain
The domain to look up

Returns

string
Returns the translation
public static
# registerDomain( string $domain, string $localePath )

Registers a new i18n domain.

Registers a new i18n domain.

Parameters

$domain
$localePath Path to the locales
$localePath
$domain Domain to bind to
protected static string
# _loadTranslationFile( string $translationFile )

Loads gettext translation and file does some operations like stripping comments on the content.

Loads gettext translation and file does some operations like stripping comments on the content.

Parameters

$translationFile

Returns

string
The preparend translation file content
Properties summary
protected static array $_i18nData

i18n related assoziative data cache.

i18n related assoziative data cache.

# array( 'language' => NULL, 'domains' => array(), 'files' => array(), 'cache' => array() )
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen