Tipi di file supportati (Strings)

.JSON - Nested React-Intl (Strings)

Contenuti tradotti automaticamente dall'inglese con Phrase Language AI.

Estensioni dei file

.json

Estensione API

react_nested_json

Importa

Esporta

Supporto forme plurali

Supporto descrizione

No

React Intl usa i file .js per salvare i dati localizzati. Inserisci Strings in un file .JSON e fai riferimento ad esso nel codice origine.

A seconda delle configurazioni dell'app, i file .JSON possono diventare complessi con più oggetti .JSON nidficati. I file .JSON nidificati vengono elaborati separando i livelli chiave con un punto .. Durante l'esportare, tutte le chiavi vengono nuovamente dividere e renderizzate come una struttura .JSON nidificata.

I chatbot IA possono essere molto efficaci nel generare un elenco di chiavi da un file .JSON.

Campione di codice

{
  "boolean_key": "--- true\n",
  "empty_string_translation": "",
  "key_with_description": "Check it! This key has a description! (At least in some formats it does)",
  "key_with_line-break": "Questa traduzione contiene\nun’interruzione di riga.",
  "nested": {
    "deeply": {
      "key": "Hey, this key is nested even deeper."
    },
    "key": "Questa chiave è nidificata in uno spazio dei nomi."
  },
  "null_translation": null,
  "pluralized_key": {
    "one": "Trovata solo una pluralizzazione.",
    "other": "Wow, hai %s pluralizzazioni!",
    "zero": "Non hai alcuna pluralizzazione."
  },
  "sample_collection": [
    "first item",
    "second item",
    "third item"
  ],
  "simple_key": "A simple key with a simple message.",
  "unverified_key": "Translation is not yet verified and waits for it. (In some formats we also export this status)"
}

Plurali per file .JSON

Il formato più comune di messaggi di chiavi plurali su varie librerie:

"messages": {
    "one": "Un messaggio ricevuto.",
    "other": "%s messaggi ricevuti.",
    "zero": "Nessun messaggio ricevuto."
}
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.