支持文件类型 (Strings)

.PHP - Laravel/F3/Kohana 数组 (Strings)

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

文件扩展名

.php

API 扩展

laravel

导入

导出

复数形式支持

描述支持

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

Laravel 数组中的复数形式

使用 plurals 时请小心。编辑器可识别简单的复数语法,例如:“Zero things|One thing|Many things”,但无法识别带有计数和范围说明符的复杂复数语法。对于复杂的复数,请在复数 Strings 中使用换行符来帮助译员。

示例

<?php

return [

    "hello" => "Welcome to my new site",

];

代码示例

<?php

return [

    "hello" => "Welcome to my new site",

    // Phrase 网页编辑器是否支持??

    "Simple_plural" => "Zero things|One thing|Many things",

        // Phrase 网页编辑器不支持??,请尝试使用换行符

    // 来帮助译员。

    "complex_plural" => "

        {0} 零个事物

        | 一个事物

        |[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.