Questions tagged [gettext]

Gettext is an internationalization and localization (i18n) library which is commonly used for writing multilingual programs. Its most popular implementation is that of the GNU project.

Gettext is an internationalization and localization (i18n) library which is commonly used for writing multilingual programs. Its most popular implementation is that of the GNU project.

I18n with gettext works by marking up translatable strings in the source code, usually by wrapping them with a function call. The xgettext tool extracts these strings and creates a text file listing them. This file is called the template and its name usually ends in ".pot".

The msginit tool creates a new text file mapping the extracted strings to their translation in a given locale, having the ".po" extension. Finally the msgfmt tool creates an optimized representation of the translation mappings that is then used at runtime. For most programs this is a binary file ending in ".mo", but it is also possible to create other formats, for example a java ResourceBundle.

There are specialized editors for editing the ".mo" files, which can remember already translated strings and contain databases of repeatedly used words.

1756 questions
0
votes
1 answer

i18n - Gettext working locally, but not on server

I work on a website, written in PHP, and I included translations via PoEdit/Gettext. On my local MAMP Server on my Mac everything is working fine. When I upload it to the Linux server of my Webhoster it is not working. Safe Mode is off and Gettext…
Torben
  • 5,388
  • 12
  • 46
  • 78
0
votes
4 answers

Error while installing dependencies for PyGTK on Mac OS 10.6.3

I tried to install the following dependencies for PyGTK 2.16.0 (the Python GIMP Tool Kit) on Mac OS 10.6.3: glib 2.25.5 gettext-0.18 libiconv-1.13.1 When I tried to install glib, I got the following error message: gconvert.c:55:2: error: #error…
Winston C. Yang
  • 1,497
  • 2
  • 18
  • 27
0
votes
2 answers

Twig, ZF2 and PoEdit

Using ZfcTwig for ZF2 and twig-gettext-extractor, I still cannot extract messages for translation from twig-files by poedit. I works if I used the formal twig keyword for translation {% trans(MY_TEXT) %} but not for the in-built view helper…
Sam Mumm
  • 84
  • 9
0
votes
3 answers

Display users input from editText field on a textView

I use getText(); on an editText using the code below and want the users input to replace a textView then how do I do this? btw the code was taken from this question: Get Value of a Edit Text field Button mButton; EditText mEdit; /** Called when…
john fowles
  • 127
  • 1
  • 6
0
votes
1 answer

PHP gettext translate available string part

I have a website where and we have some descriptions saved in english. we want to translate them in other languages like french, chinese etc. My string is Call Consumption period before the 2015-01-27 Maintenance of Phone Numbers Quantity 10 My…
Huzoor Bux
  • 1,026
  • 4
  • 20
  • 46
0
votes
1 answer

Translation with javascript

I have a angulerjs / grunt / gettext / node.js application. I have generated pot files but how can I make my program translate automatically? I see you can upload them using pootle, zanata etc. but have not found enough online help with this. Thank…
Lance
  • 19
  • 5
0
votes
1 answer

angular-gettext library- fails to compile JSON files?

I am using grunt-angular-gettext. I am trying to compile PO files present in PO folder and output the JSON files in different folder. The folder and JSON files are not getting generated. Below is the grunt config for compile: nggettext_compile: { …
user2439903
  • 1,277
  • 2
  • 34
  • 68
0
votes
1 answer

translate regions and cities in osclass

Is it possible to translate cities as normal text without duplicating any table on the DB and only add the cities and their translations to .po here is a loop to list all the cities