i18n

Summary

Marks a string for translation.

Usage

$input_string|i18n( [ context [, comment [, arguments ] ] ] )

Parameters

NameTypeDescriptionRequired
context string Context describing where the string belongs no
comment string Comment describing text futher no
arguments hash Hash containing arguments in input_string no

Returns

input_string translated to current language if translation exists, else input_string if none exists.

Description

eZ i18n handles text conversion between various charsets, its primary use is for converting to and from UTF8. Text manipulation regardless of the charset used is possible by using the eZTextCodec class. It's also possible to query for information on various charsets.

eZ i18n supports the mbstring extension which can be compiled in PHP, when used the conversion will be much faster. mbstring is only used for those charsets it supports.

Text translation is also possible by using the eZTranslatorManager and XML translation files¹.

¹ Use Qt's linguist to translate files

Examples

{" This is a test"|i18n}

returns "This is a test" translated to current language.

{let number=5}

 {"Please enter %number characters"|i18n( '', '', hash( '%number', $number ) )}

{/let}

returns "Please enter 5 characters". When translated, %number is replaced by the variable dynamicly.

Comments

log in or create a user account to comment.

Contents

Reference

Database diagram
Template operators
    PDF
    Arrays
    Data extraction
    Formatting
       datetime
       i18n
       l10n
       si
       x18n
    Images
    Logic
    Mathematics
    Miscellaneous
    Strings
    URLs
    Variables
Template functions
Data fetching
Modules
XML tags


Created

05/02/2004
11:36:01 am
by Balazs Halasy

Last updated

24/06/2004
8:42:15 pm
by Dirk Billerbeck

Authors

Balazs Halasy
Kåre Køhler Høvik
Grenland Web (Jan Kudlicka)
Dirk Billerbeck



This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.