Tipi di file supportati (Strings)

.JSON - i18n-node-2 (Strings)

Contenuti tradotti automaticamente dall'inglese con Phrase Language AI.

Estensioni dei file

.js

Estensione API

node_json

Importa

Esporta

Supporto forme plurali

Supporto descrizione

No

I18n-node-2 è una libreria basata su Node.js che può lavorare fuori dagli schemi con Express.js. I18n-node-2 si integra con le applicazioni rendendo possibili rapide estrazioni di stringhe. Tutto ciò che bisogna fare è includere le stringhe a tradurre con il metodo predefinito _(“…”). Durante l'esecuzione, i18n-node-2 genera automaticamente più file JSON a seconda delle impostazioni locali predefinite.

I18n-node-2 utilizza il formato .JSON generato automaticamente per memorizzare i dati traducibili. Prima della traduzione, esegui una verifica di integrità dei file. Con i18n-node-2 che supporta le forme plurali, assicurati che tutte le variabili rimangano invariate durante la traduzione.

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

i18n-node-2 su GitHub

Campione di codice

{
  "boolean_key": "--- true\n",
  "empty_string_translation": "",
  "chiave_con_descrizione": "Dai un'occhiata!" Questa chiave ha una descrizione! (Almeno in alcuni formati)",
  "key_with_line-break": "This translations contains\na line-break.",
  "nested.deeply.key": "I'm a deeply nested key.",
  "nested.key": "This key is nested inside a namespace.",
  "null_translation": null,
  "pluralized_key": {
    "one": "Only one pluralization found.",
    "other": "Wow, you have %s pluralizations!",
    "zero": "You have no pluralization."
  },
  "sample_collection": [
    "first item",
    "second item",
    "third item"
  ],
  "simple_key": "simple key, simple message, so simple.",
  "chiave_non_verificata": "Questa traduzione non è ancora verificata e resta in attesa." (In alcuni formati esportiamo anche lo stato)"
}

Plurali per file .JSON

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

"messages": {
    "one": "One message received.",
    "other": "%s messaggi ricevuti.",
    "zero": "No messages received."
}
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.