ืืขืฆื ืืขืืจื ืงืืืฆื GNU Gettext PO
ืขืฆืื, ืืืชื ืืืืงื ืงืืืฆื ืชืจืืื GNU Gettext PO ืขื msgid, โmsgstr, โmsgid_plural ืืืฆืืื ื ืืงืื ืฉื printf โ(%s, %d).
ืชืื ืืืช9
PO ืขืืจื
ืชืืืืจ ืชืงืื
68 ืชืืืื3 ืฉืืจืืช
ืืฉืชื ื ืืืืงื ืืชืฆืืื ืืงืืืื ืืื
ืฉื ื ืืฉืชื ืื ืืืืืืคื ืฉืคืืช ืืื ืืืืช ืืช ืืืื ืืจืืื ืฉื CLDR
ืฉืคื:
ืื ืืืื ืืฉืชื ืื ืืืืจืืืช ืืืืืขื.
ืคืื ืืจืื ืืจ (fr):
# Simple greeting
msgid "Hello, world!"
msgstr "Bonjour, le monde !"
ืืืฆืื ืืืฆืืจื ืืืืื ืืืืคืืกืื ืฉื Intlayer
Intlayer ืืืืชืช ืชืจืืืืื ืืืื ืืงืืืคืืืฆืื ืขื ืืฉืืื ืืืืืืืืช ืืืื ืฉื TypeScript.
GNU Gettext PO Syntax Cheat Sheet
ืืืื ืชืืืืจ ืืืืจืื ืืืืฆื ืื ืืคืืก ืืืืคื ืืืฆืืจืืช ืืืืืืช ืืืืคืืกืื ืฉื Intlayer
| ืคืืฆ'ืจ | ืชืืืืจ | ืืืืื | ืืขืจืืช | ืืืงืืืื ื-Intlayer |
|---|---|---|---|---|
| Singular Message | msgid "..." \n msgstr "..." | msgid "Hello" \n msgstr "Bonjour" | msgid is source key, msgstr is translated text | t({ en: "Hello", fr: "Bonjour" }) |
| Plural Messages | msgid_plural "..." \n msgstr[N] "..." | msgid "file" \n msgid_plural "files" \n msgstr[0] "fichier" \n msgstr[1] "fichiers" | Plural-Forms header defines index calculation | plural({ one: "file", other: "{{count}} files" }) |
| Context (msgctxt) | msgctxt "context" \n msgid "..." | msgctxt "menu" \n msgid "File" | Disambiguates identical msgid in different contexts | Separate keys or select() nodes |
| Printf Specifiers | %s, %d, %1$s | msgid "%d items found" | Position-aware C printf formatters | {{count}} or named interpolations |
| Comments | # translator, #: reference, #, flag | #: src/app.tsx:42 | Standard PO comments generated by xgettext | TypeScript comments in .content.ts |
ืืืจืืืืงืืืจื ืืืืกืกืช ืืงืืืคืืืืจ ืฉื Intlayer ืืืืืคื ื ืืชืื ืืืืขืืช ืืืจืื ืืืื ืจืืฆื ืืืืืืืช ืืืคืืกืื ืืืื ืงืืืคืืืฆืื ืืืืืืืฅ ืืืืืืื.
ืืืงืืกืืกืื ืฉื Intlayer
ืืขืืื ืื ืชืืืื ืฉืื ืืชืืืืจ ืืืจืื
Intlayer ืืืคืืช ืืช ืืืื ืืื ืืืืืืืช ืคืืชืื ืืื ื ืขื ืืืืืืช ืืืคืืกืื ืืืื ืงืืืคืืืฆืื, ืืืืืฅ ืืืืืืื ืืงืืืคืื ื ืืืช ืืฉืืืื ืืืง ืขื ื-CMS.