[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/docs/contributor/ -> internationalization.diviner (summary)

(no description)

File Size: 64 lines (2 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 function

  built()

Functions
Functions that are not part of a class:

built(Developers are supposed to call @{function@libphutil:pht} on all strings thatrequire translation.Phabricator provides translations for this translator through@{class:PhabricatorTranslation} class.= Adding a New Translation =Adding a translation which uses the same language rules as some already existingtranslation is relatively simple: Just extend @{class:PhabricatorTranslation}and you will be able to specify this class in the global configuration'translation.provider' and users will be able to select it in their preferences.= Adding a New Language =Adding a language involves all steps as adding a translation plus specifying thelanguage rules in @{method@libphutil:PhutilTranslator::chooseVariant}.= Singular and Plural =Different languages have various rules for using singular and plural. All youneed to do is to call @{function@libphutil:pht} with a text that is suitable forboth forms. Example:pht('%d beer(s)   X-Ref
No description



Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1