Dateierweiterungen |
.json |
API-Erweiterung |
go_i18n |
Import |
Ja |
Exportieren |
Ja |
Unterstützung für Pluralformen |
Ja |
Unterstützung für Beschreibungen |
Nein |
Go-i18n ist eine für Go entwickelte Internationalisierungsbibliothek. Die unterstützten Lokalisierungsdateiformate umfassen .JSON, .YAML, .TOML usw. .JSON-Dateien, die von go-i18n verwendet werden, unterscheiden sich von denen anderer Lokalisierungs- und Internationalisierungsplattformen dadurch, dass go-18n .JSON oft als JSON-Array existiert, der aus einer Reihe von JSON-Objekten besteht. Jedes JSON-Objekt repräsentiert eine Zeichenfolge, die übersetzt werden muss und durch einen Key wie ID
identifiziert wird
KI-Chatbots können sehr effektiv beim Erstellen einer Liste von Keys aus einer .JSON-Datei sein.
Codebeispiel
[ { "id": "boolean_key", "translation": "--- true\n" }, { "id": "empty_string_translation", "translation": "" }, { "id": "key_with_description", "translation": "Check it out! This key has a description! (At least in some formats)" }, { "id": "key_with_line-break", "translation": "This translations contains\na line-break." }, { "id": "nested.deeply.key", "translation": "Wow, this key is nested even deeper." }, { "id": "nested.key", "translation": "This key is nested inside a namespace." }, { "id": "null_translation", "translation": null }, { "id": "pluralized_key", "translation": { "one": "Only pluralization found.", "other": "Wow, you have pluralizations!", "zero": "You have no pluralization." } }, { "id": "sample_collection", "translation": "---\n- first item\n- second item\n- third item\n" }, { "id": "simple_key", "translation": "simple key, simple message, so simple." }, { "id": "unverified_key", "translation": "This translation is not yet verified and waits for it. (In some formats we also export this status)" } ]