A PO (portable object) file is made up of many entries, each entry holding the relation between an original untranslated string and its corresponding translation. All entries in a PO file usually pertain to a single project, and all translations are expressed in a single target language.


Lokalise parses the following keys:

#: (reference)
# or #@ or #. (comment)
#, fuzzy (fuzzy flag)
msgctxt
msgid
msgid_plural
msgstr

Plural forms are accepted. Obsolete terms marked with (#~) are not imported from .po and .pot files.

Headers

As you upload the source .po files, Lokalise extracts the header and adds an archived key lokalise.po.header with the header content. To edit the contents, in the project editor click Filter > QA > Archived. Copy/paste the contents of the header to all languages if required. You can also manually create this key, if necessary.

Note on descriptions and comments

Please note that if you are uploading a translation file with multiple descriptions, all additional descriptions will be stored under the comments for the key. Upon downloading such keys, you'll need to include both comments and descriptions to the export bundle.

Known limitations

At the moment, Lokalise does not add/update language-specific plural form headers to Gettext files, so you'll have to add those manually, for example (note the last Plural-Forms header):

"Project-Id-Version: Sample 1.0.1\n"
"Report-Msgid-Bugs-To: support@example.com \n"
"Last-Translator: Username <user@example.com>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

You can find the table with all the plural headers in the following document or in the table below:

ISO

English name

Plurals header in .po files

A

ach

Acholi

nplurals=2; plural=(n > 1);

af

Afrikaans

nplurals=2; plural=(n != 1);

ak

Akan

nplurals=2; plural=(n > 1);

am

Amharic

nplurals=2; plural=(n > 1);

an

Aragonese

nplurals=2; plural=(n != 1);

anp

Angika

nplurals=2; plural=(n != 1);

ar

Arabic

nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 ? 4 : 5);

arn

Mapudungun

nplurals=2; plural=(n > 1);

as

Assamese

nplurals=2; plural=(n != 1);

ast

Asturian

nplurals=2; plural=(n != 1);

ay

Aymará

nplurals=1; plural=0;

az

Azerbaijani

nplurals=2; plural=(n != 1);

B

be

Belarusian

nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);

bg

Bulgarian

nplurals=2; plural=(n != 1);

bn

Bengali

nplurals=2; plural=(n != 1);

bo

Tibetan

nplurals=1; plural=0;

br

Breton

nplurals=2; plural=(n > 1);

brx

Bodo

nplurals=2; plural=(n != 1);

bs

Bosnian

nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);

C

ca

Catalan

nplurals=2; plural=(n != 1);

cgg

Chiga

nplurals=1; plural=0;

cs

Czech

nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;

csb

Kashubian

nplurals=3; plural=(n==1) ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;

cy

Welsh

nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != 11) ? 2 : 3;

D

da

Danish

nplurals=2; plural=(n != 1);

de

German

nplurals=2; plural=(n != 1);

doi

Dogri

nplurals=2; plural=(n != 1);

dz

Dzongkha

nplurals=1; plural=0;

E

el

Greek

nplurals=2; plural=(n != 1);

en

English

nplurals=2; plural=(n != 1);

eo

Esperanto

nplurals=2; plural=(n != 1);

es

Spanish

nplurals=2; plural=(n != 1);

es_AR

Argentinean Spanish

nplurals=2; plural=(n != 1);

et

Estonian

nplurals=2; plural=(n != 1);

eu

Basque

nplurals=2; plural=(n != 1);

F

fa

Persian

nplurals=2; plural=(n > 1);

ff

Fulah

nplurals=2; plural=(n != 1);

fi

Finnish

nplurals=2; plural=(n != 1);

fil

Filipino

nplurals=2; plural=(n > 1);

fo

Faroese

nplurals=2; plural=(n != 1);

fr

French

nplurals=2; plural=(n > 1);

fur

Friulian

nplurals=2; plural=(n != 1);

fy

Frisian

nplurals=2; plural=(n != 1);

G

ga

Irish

nplurals=5; plural=n==1 ? 0 : n==2 ? 1 : (n>2 && n<7) ? 2 :(n>6 && n<11) ? 3 : 4;

gd

Scottish Gaelic

nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;

gl

Galician

nplurals=2; plural=(n != 1);

gu

Gujarati

nplurals=2; plural=(n != 1);

gun

Gun

nplurals=2; plural=(n > 1);

H

ha

Hausa

nplurals=2; plural=(n != 1);

he

Hebrew

nplurals=2; plural=(n != 1);

hi

Hindi

nplurals=2; plural=(n != 1);

hne

Chhattisgarhi

nplurals=2; plural=(n != 1);

hr

Croatian

nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);

hu

Hungarian

nplurals=2; plural=(n != 1);

hy

Armenian

nplurals=2; plural=(n != 1);

I

ia

Interlingua

nplurals=2; plural=(n != 1);

id

Indonesian

nplurals=1; plural=0;

is

Icelandic

nplurals=2; plural=(n%10!=1 || n%100==11);

it

Italian

nplurals=2; plural=(n != 1);

J

ja

Japanese

nplurals=1; plural=0;

jbo

Lojban

nplurals=1; plural=0;

jv

Javanese

nplurals=2; plural=(n != 0);

K

ka

Georgian

nplurals=1; plural=0;

kk

Kazakh

nplurals=2; plural=(n != 1);

kl

Greenlandic

nplurals=2; plural=(n != 1);

km

Khmer

nplurals=1; plural=0;

kn

Kannada

nplurals=2; plural=(n != 1);

ko

Korean

nplurals=1; plural=0;

ku

Kurdish

nplurals=2; plural=(n != 1);

kw

Cornish

nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n == 3) ? 2 : 3;

ky

Kyrgyz

nplurals=2; plural=(n != 1);

L

lb

Letzeburgesch

nplurals=2; plural=(n != 1);

ln

Lingala

nplurals=2; plural=(n > 1);

lo

Lao

nplurals=1; plural=0;

lt

Lithuanian

nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);

lv

Latvian

nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);

M

mai

Maithili

nplurals=2; plural=(n != 1);

me

Montenegro

nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;

mfe

Mauritian Creole

nplurals=2; plural=(n > 1);

mg

Malagasy

nplurals=2; plural=(n > 1);

mi

Maori

nplurals=2; plural=(n > 1);

mk

Macedonian

nplurals=2; plural= n==1 || n%10==1 ? 0 : 1; Can’t be correct needs a 2 somewhere

ml

Malayalam

nplurals=2; plural=(n != 1);

mn

Mongolian

nplurals=2; plural=(n != 1);

mni

Manipuri

nplurals=2; plural=(n != 1);

mnk

Mandinka

nplurals=3; plural=(n==0 ? 0 : n==1 ? 1 : 2);

mr

Marathi

nplurals=2; plural=(n != 1);

ms

Malay

nplurals=1; plural=0;

mt

Maltese

nplurals=4; plural=(n==1 ? 0 : n==0 || ( n%100>1 && n%100<11) ? 1 : (n%100>10 && n%100<20 ) ? 2 : 3);

my

Burmese

nplurals=1; plural=0;

N

nah

Nahuatl

nplurals=2; plural=(n != 1);

nap

Neapolitan

nplurals=2; plural=(n != 1);

nb

Norwegian Bokmal

nplurals=2; plural=(n != 1);

ne

Nepali

nplurals=2; plural=(n != 1);

nl

Dutch

nplurals=2; plural=(n != 1);

nn

Norwegian Nynorsk

nplurals=2; plural=(n != 1);

no

Norwegian (old code)

nplurals=2; plural=(n != 1);

nso

Northern Sotho

nplurals=2; plural=(n != 1);

O

oc

Occitan

nplurals=2; plural=(n > 1);

or

Oriya

nplurals=2; plural=(n != 1);

P

pa

Punjabi

nplurals=2; plural=(n != 1);

pap

Papiamento

nplurals=2; plural=(n != 1);

pl

Polish

nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);

pms

Piemontese

nplurals=2; plural=(n != 1);

ps

Pashto

nplurals=2; plural=(n != 1);

pt

Portuguese

nplurals=2; plural=(n != 1);

pt_BR

Brazilian Portuguese

nplurals=2; plural=(n > 1);

R

rm

Romansh

nplurals=2; plural=(n != 1);

ro

Romanian

nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2);

ru

Russian

nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);

rw

Kinyarwanda

nplurals=2; plural=(n != 1);

S

sah

Yakut

nplurals=1; plural=0;

sat

Santali

nplurals=2; plural=(n != 1);

sco

Scots

nplurals=2; plural=(n != 1);

sd

Sindhi

nplurals=2; plural=(n != 1);

se

Northern Sami

nplurals=2; plural=(n != 1);

si

Sinhala

nplurals=2; plural=(n != 1);

sk

Slovak

nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;

sl

Slovenian

nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);

so

Somali

nplurals=2; plural=(n != 1);

son

Songhay

nplurals=2; plural=(n != 1);

sq

Albanian

nplurals=2; plural=(n != 1);

sr

Serbian

nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);

su

Sundanese

nplurals=1; plural=0;

sv

Swedish

nplurals=2; plural=(n != 1);

sw

Swahili

nplurals=2; plural=(n != 1);

T

ta

Tamil

nplurals=2; plural=(n != 1);

te

Telugu

nplurals=2; plural=(n != 1);

tg

Tajik

nplurals=2; plural=(n > 1);

th

Thai

nplurals=1; plural=0;

ti

Tigrinya

nplurals=2; plural=(n > 1);

tk

Turkmen

nplurals=2; plural=(n != 1);

tr

Turkish

nplurals=2; plural=(n > 1);

tt

Tatar

nplurals=1; plural=0;

U

ug

Uyghur

nplurals=1; plural=0;

uk

Ukrainian

nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);

ur

Urdu

nplurals=2; plural=(n != 1);

uz

Uzbek

nplurals=2; plural=(n > 1);

V

vi

Vietnamese

nplurals=1; plural=0;

W

wa

Walloon

nplurals=2; plural=(n > 1);

wo

Wolof

nplurals=1; plural=0;

Y

yo

Yoruba

nplurals=2; plural=(n != 1);

Z

zh

Chinese [1]

nplurals=1; plural=0;

zh

Chinese [2]

nplurals=2; plural=(n > 1);

[1] All districts and all variants of Chinese, such as zh_CN, zh_HK, zh_TW, and so on.

[2] In rare cases where plural form introduces difference in personal pronoun (such as her vs. they, we vs. I), the plural form is different.

Did this answer your question?