How to Create .PO File Manually

Enter this initiating code into your empty, .PO extensioned file AND change the values mindly then save it UTF8 encoded.

# Blank WordPress Pot
msgid ""
msgstr ""
"Project-Id-Version: {{PROJECT TITLE}}\n"
"POT-Creation-Date: 2019-03-27 23:42+0300\n"
"PO-Revision-Date: 2019-03-27 23:42+0300\n"
"Last-Translator: \n"
"Language-Team: {{NAME \n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2.1\n"
"X-Poedit-Basepath: ..\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;"
"esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;"
"_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
"X-Poedit-SearchPath-0: class-profilegrid-woocommerce-public.php\n"

#: class-profilegrid-woocommerce-public.php:5
#: class-profilegrid-woocommerce-public.php:45
#: class-profilegrid-woocommerce-public.php:115
msgid "Purchases"
msgstr "{{TRANSLATION}}"

Language field must be the initial letters of the language which is being translated to. Plural Forms field can take a regular .PO file according to the language. X-Poedit-SearchPath-0 field is about the files which includes the lines of the words needs to be translated. #: class... line in this code has the filename and the line number of the source word. msgid the rest is clear to guess.

Start the Discussion!Leave a Reply