__(string $singular, mixed ...$args): string
如果找到翻译后的字符串,则返回该字符串;否则返回提交的消息。
string $singular要翻译的文本。
mixed ...$args包含参数的数组或函数中的多个参数。
string__d(string $domain, string $msg, mixed ...$args): string
允许您覆盖单个消息查找的当前域。
string $domain域。
string $msg要翻译的字符串。
mixed ...$args包含参数的数组或函数中的多个参数。
string__dn(string $domain, string $singular, string $plural, int $count, mixed ...$args): string
允许您覆盖单个复数消息查找的当前域。返回来自域 $domain 的 count $count 的 $singular 和 $plural 标识的消息的正确复数形式。
string $domain域。
string $singular要翻译的单数字符串。
string $plural复数。
int $count计数。
mixed ...$args包含参数的数组或函数中的多个参数。
string__dx(string $domain, string $context, string $msg, mixed ...$args): string
允许您覆盖单个消息查找的当前域。上下文是翻译字符串的唯一标识符,使其在同一个域内变得唯一。
string $domain域。
string $context文本的上下文。
string $msg要翻译的字符串。
mixed ...$args包含参数的数组或函数中的多个参数。
string__dxn(string $domain, string $context, string $singular, string $plural, int $count, mixed ...$args): string
返回由 $singular 和 $plural 为计数 $count 标识的消息的正确复数形式。允许您覆盖单个消息查找的当前域。上下文是翻译字符串的唯一标识符,使其在同一个域内变得唯一。
string $domain域。
string $context文本的上下文。
string $singular要翻译的单数文本。
string $plural复数文本。
int $count计数。
mixed ...$args包含参数的数组或函数中的多个参数。
string__n(string $singular, string $plural, int $count, mixed ...$args): string
返回由 $singular 和 $plural 为计数 $count 标识的消息的正确复数形式。一些语言对于复数消息有多种形式,具体取决于计数。
string $singular要翻译的单数文本。
string $plural复数文本。
int $count计数。
mixed ...$args包含参数的数组或函数中的多个参数。
string__x(string $context, string $singular, mixed ...$args): string
如果找到翻译后的字符串,则返回该字符串;否则返回提交的消息。上下文是翻译字符串的唯一标识符,使其在同一个域内变得唯一。
string $context文本的上下文。
string $singular要翻译的文本。
mixed ...$args包含参数的数组或函数中的多个参数。
string__xn(string $context, string $singular, string $plural, int $count, mixed ...$args): string
返回由 $singular 和 $plural 为计数 $count 标识的消息的正确复数形式。一些语言对于复数消息有多种形式,具体取决于计数。上下文是翻译字符串的唯一标识符,使其在同一个域内变得唯一。
string $context文本的上下文。
string $singular要翻译的单数文本。
string $plural复数文本。
int $count计数。
mixed ...$args包含参数的数组或函数中的多个参数。
stringtoDate(mixed $value, string $format = 'Y-m-d'): Date|null
将值转换为 Date 对象。
integer - 值被视为 Unix 时间戳 float - 值被视为带有微秒的 Unix 时间戳 string - 值被视为 I18N 短格式日期,除非另有说明 其他值返回为 null。
mixed $value要转换为 Date 的值。
string $format 可选值的日期格式。默认为短格式(例如:1970-01-01)。
Date|nulltoDateTime(mixed $value, string $format = DateTimeInterface::ATOM): Cake\I18n\DateTime|null
将值转换为 DateTime 对象。
integer - 值被视为 Unix 时间戳 float - 值被视为带有微秒的 Unix 时间戳 string - 值被视为 Atom 格式的时间戳,除非另有说明 其他值返回为 null。
mixed $value要转换为 DateTime 的值。
string $format 可选值的日期时间格式。默认为 Atom 格式(例如:1970-01-01T12:00:00+00:00)。
Cake\I18n\DateTime|null格式化程序接口
包装多个消息加载器,按顺序调用它们,直到其中一个返回非空包。
扩展 Chronos 提供的 Date 类。
扩展内置的 DateTime 类,以提供方便的方法和区域感知格式化帮助程序。
用于加载和保留格式化程序对象的 ServiceLocator 实现。
I18n 处理文本和时间格式字符串的翻译。
通用的翻译包工厂,它将根据文件扩展名和包名称加载翻译文件。
数字帮助程序库。
消息目录
用于加载和保留包对象的 ServiceLocator 实现。
用于根据区域设置确定要用于变量的复数的实用程序类。
用于格式化相对日期和时间的帮助程序类。
扩展 Chronos 提供的 Time 类。
用于翻译消息的翻译器。
构造和存储翻译器实例,这些实例可以按名称和区域设置检索。