1
votes

I will translate our web (written with php) into other languages and I'm thinking in using gettext to do it. Also, I have see that English is used as placeholder or msgid.

My web site is currently in Spanish and I think if I can use Spanish as the msgid instead of English. Is there any problem doing it? (apart of English been more international).

This will help us when we add new strings that don't get translated as we will still making the web in Spanish and prefer a mixed web (with Spanish fragments in English pages) than a Spanish version with missed strings (because we don't have the English msgid).

1

1 Answers

0
votes

Appear that gettext admit it, so I think it is possible.

What you need to get in mind is the encoding when extracting the strings and when manipulating the po and pot files so they aren't corrupted. For example, if use xgettext to extract strings from a php file in UTF-8, use the --from-code option, like in:

xgettext --from-code UTF-8 prueba.php

Appart of this "technically, you can do it", is discourage as using English is more spread to be translated and its chars are all ascii so easy to not corrupt they.