IL10N¶
-
interface
OCP\
IL10N
¶ - Interface IL10N
Implemented by: OC\L10N\L10N
OC\L10N\LazyL10N
Source: lib/public/IL10N.php#48
Methods¶
-
public
OCP\IL10N::
t
($text, $parameters=[])¶ - Translating
Source: Parameters: - $text (string) The text we need a translation for
- $parameters (array | string) default:array() Parameters for sprintf
Returns: string Translation or the same text
Returns the translation. If no translation is found, $text will be returned.
Since: 6.0.0
-
public
OCP\IL10N::
n
($text_singular, $text_plural, $count, $parameters=[])¶ - Translating
Source: Parameters: - $text_singular (string) the string to translate for exactly one object
- $text_plural (string) the string to translate for n objects
- $count (int) Number of objects
- $parameters (array) default:array() Parameters for sprintf
Returns: string Translation or the same text
Returns the translation. If no translation is found, $text will be returned. %n will be replaced with the number of objects.
The correct plural is determined by the plural_forms-function provided by the po file.
Since: 6.0.0
-
public
OCP\IL10N::
l
($type, $data, $options=[])¶ - Localization
Source: Parameters: - $type (string) Type of localization
- $data (
DateTime
| int | string) parameters for this localization - $options (array) currently supports following options:
- ‘width’: handed into PunicCalendar::formatDate as second parameter
Returns: string | int | bool Returns the localized data.
- Implemented types:
- - date
- Creates a date - l10n-field: date - params: timestamp (int/string)
- - datetime
- Creates date and time - l10n-field: datetime - params: timestamp (int/string)
- - time
- Creates a time - l10n-field: time - params: timestamp (int/string)
Since: 6.0.0 - parameter $options was added in 8.0.0
-
public
OCP\IL10N::
getLanguageCode
()¶ - The code (en, de, ...) of the language that is used for this IL10N object
Source: lib/public/IL10N.php#113 Returns: string language Since: 7.0.0
-
public
OCP\IL10N::
getLocaleCode
()¶ - * The code (en_US, fr_CA, ...) of the locale that is used for this IL10N object
Source: lib/public/IL10N.php#121 Returns: string locale Since: 14.0.0