支持文件类型 (Strings)

.PHP - Laravel/F3/Kohana Array (Strings)

文本由 Phrase Language AI 从英语机器翻译而得。

文件扩展名

.php

API 扩展

laravel

导入

导出

复数形式支持

描述支持

Laravel使用普通PHP数组作为其区域消息文件。数组是有序的列表或项目集合。数组的项可以是PHP中的任何类型:数字、字符串、对象、另一个数组等。字符串通常用作区域消息数组中的值。Laravel使用包含键值对的关联数组;每个消息文件也有一个匿名数组,文件返回该数组。

Laravel数组中的复数形式

在处理复数时要小心。编辑器识别简单的复数语法,例如。“零个东西|一个东西|多个东西”,但不会识别带有计数和范围说明符的复杂复数语法。对于复杂的复数形式,在复数字符串中使用换行符以帮助翻译者。

示例

<?php

return [

    "hello" => "欢迎来到我的新网站",

];

代码示例

<?php

return [

    "hello" => "欢迎来到我的新网站",

    // 在Phrase网页编辑器中支持??

    "Simple_plural" => "零个东西|一个东西|多个东西",

        // 在Phrase网页编辑器中不支持??,尝试使用新

    // 行以帮助翻译者。

    "complex_plural" => "

        {0} 零个东西

        |{1} 一个东西

        |[2,*] 多个事物

    \

];
这篇文章有帮助吗?

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.