Tipi di file supportati (Strings)

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

Contenuti tradotti automaticamente dall'inglese con Phrase Language AI.

Estensioni dei file

.php

Estensione API

laravel

Importa

Esporta

Supporto forme plurali

Supporto descrizione

No

Laravel usa array PHP semplici per i suoi file di messaggio delle impostazioni locali. Un array è un elenco ordinato o una raccolta di elementi. Gli elementi dell'array possono essere di qualsiasi tipo in PHP: un numero, una stringa, un oggetto, un altro array, ecc. Le Strings sono spesso usate come valori negli array di messaggi delle impostazioni locali. Laravel usa array associativi contenenti coppie chiave-valore; ha anche un array anonimo per file di messaggio con il file che restituisce l'array.

Plurali negli array Laravel

Usare cautela quando si lavora con i plurali. L'editor riconosce la sintassi plurale semplice, ad es. “Zero things|One thing|Many things” ma non riconoscerà la sintassi plurale complessa con specificatori di conteggio e intervallo. Per i plurali complessi, usare le nuove righe nelle Strings plurali per aiutare i traduttori.

Esempio:

<?php

return [

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

];

Campione di codice

<?php

return [

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

    // Supportato nell'editor web Phrase ??

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

        // Non supportato nell'editor web Phrase ??, provare a usare nuove

    // righe per aiutare i traduttori.

    \"complex_plural\" => \""

        {0} Zero cose

        | Una cosa

        |[2,*] Cose multiple

    ",

];
Questo articolo ti è stato utile?

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.