File Extensions |
.php |
API Extension |
laravel |
Import |
Yes |
Export |
Yes |
Plural forms support |
Yes |
Description support |
No |
Laravel uses plain PHP arrays for its locale message files. An array is an ordered list or collection of items. The items of the array can be of any type in PHP: a number, a string, an object, another array, etc. Strings are often used as values in locale message arrays. Laravel uses associative arrays containing key-value pairs; it also has one anonymous array per message file with the file returning the array.
Plurals in Laravel Arrays
Use caution when working with plurals. The editor recognizes simple plural syntax, e.g. “Zero things|One thing|Many things” but will not recognize complex plural syntax with count and range specifiers. For complex plurals, use newlines in plural strings to help translators.
Example:
<?php return [ "hello" => "Welcome to my new site", ];
Code Sample
<?php return [ "hello" => "Welcome to my new site", // Supported in Phrase web editor ?? "Simple_plural" => "Zero things|One thing|Many things", // Not supported in Phrase web editor ??, try to use new // lines to help translators. "complex_plural" => " {0} Zero things |{1} One thing |[2,*] Multiple things ", ];