GNU Gettext PO Free
ByCrowdinVerified Author

Localization format for GNU Gettext

Try Crowdin

GNU Gettext PO translation with Crowdin

Copy link

GNU Gettext is a widely used internationalization (i18n) system that has implementations for a majority of programming languages and frameworks. It is commonly used for internationalizing PHP and Python, but it can also be found as a recommended technology for localizing games and JavaScript frameworks.

Gettext offers different resource file formats for externalizing translatable texts. The most common human- and machine-readable file format is Portable Object (.po), which Crowdin supports.

Gettext itself does not have any recommendations for variable (placeholder) syntax. The variable's syntax will vary depending on the underlying technology and can be anything from %s, %d to ${var}, {var} or [[var]]. Crowdin supports the most commonly used variable formats and will automatically detect, highlight, and validate them in the editor.

File Format Details

Copy link
Attribute Value
File Extension .po, .pot
API Type gettext
Source can be edited in Crowdin Yes
Generating translated files via Bundles Search Crowdin Store
Supports pluralization Yes
WYSIWYG Preview in the editor No
Supported types of contextual information Text comments, Screenshots, In-Context
Custom attributes Yes
Existing translations import possibility Key-value mapping

Sample File

Copy link
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2008-09-03 10:09+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <kde-i18n-doc@kde.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"

#: simple string sample
msgid "Text for translation"
msgstr ""

#. sample with translated string
msgid "Text for translation"
msgstr "Translated string"

#, long string with new line
msgid ""
"Very long string.\n"
"Even longer string"
msgstr ""
"translation\n"
"translation_2"

#: plurals
#, string with plurals forms
msgid "Time: %1 second"
msgid_plural "Time: %1 seconds"
msgstr[0] "Czas: %1 sekunda"
msgstr[1] "Czas: %1 sekundy"
msgstr[2] "Czas: %1 sekund"

Translating GNU Gettext PO

Copy link

Custom Attributes

Source text will be taken from the msgstr node:


"X-Crowdin-SourceKey: msgstr\n"

Comments

Comment to the string can be indicated by the following characters: # #: #. #, #| #~


#: comment to the string

msgid "Text for translation"

msgstr ""

Plurals


msgid "Time: %1 second"

msgid_plural "Time: %1 seconds"

msgstr[0] "Czas: %1 sekunda"

msgstr[1] "Czas: %1 sekundy"

msgstr[2] "Czas: %1 sekund"

Crowdin is a platform that helps you manage and translate content into different languages. Integrate Crowdin with your repo, CMS, or other systems. Source content is always up to date for your translators, and translated content is returned automatically.

Learn More
Categories
File Formats
Works with
  • Crowdin Enterprise
  • crowdin.com
Details

Released on May 16, 2022

Updated on May 23, 2024

Published by Crowdin

Identifier:gnu-gettext