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
2 answers

The gettext "msgfmt" command exits with status code 0 but does not write an .MO file

I've been making international-ready an application using the gettext family of tools, translating the .po. file to .mo using the msgfmt program. This was working at first, but as of the last few days it has stopped working. No errors are reported…
Magnus
  • 101
  • 5
0
votes
1 answer

Questions regarding language translation using .pot file

I have a .pot file that I wish to translate to a native language and get the final .po file. At this moment, the only plausible option that I have is to open the set of .pot files in a text editor and convert each phrase to the native language. I…
user27396
  • 79
  • 1
  • 8
0
votes
3 answers

How to configure gettext with Yii::t() in Yii2 advanced?

I'm installed Yii2 advanced template and configure Yii::t() with PhpMessageSource, but i need configure it with GettextMessageSource. I'm added to common/config/main-local.php this code: 'i18n' => [ 'translations' => [ …
Demir Volkov
  • 3
  • 1
  • 2
0
votes
1 answer

Angular translate decimal numbers

I am using angular-gettext for a project. I was wondering if somehow I could translate decimal numbers. FX in some languages you write 2.5 and some other 2,5. Do you have any idea if this is doable via the angular-gettext? What other workaround…
Potney Switters
  • 2,902
  • 4
  • 33
  • 51
0
votes
1 answer

Localization in kendo grid using angular-gettext?

In the kendo localization example mentioned here: http://demos.telerik.com/kendo-ui/grid/localization The grid's data are getting localized. And the column names are hardcoded in the grid options. Is there a way to localize the column names as…
user2439903
  • 1,277
  • 2
  • 34
  • 68
0
votes
1 answer

getText wont work on a JTextField for some reason

Here is my code Its asking to me set changeName to a static variable. This wouldnt make sense because I'm trying to capture user input. import java.awt.Color; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import…
0
votes
3 answers

How to use Poedit with smarty templates?

I'm using PoEdit on smarty templates (phtml and tpl files) with the following Poedit configuration for PHP parser : Extensions: *.php;*.phtml;*.tpl Parser command : xgettext --language=PHP --force-po -o %o %C %K %F If i'm using gettext inside PHP…
vard
  • 4,057
  • 2
  • 26
  • 46
0
votes
1 answer

How to make Numeric Edit Text default to blank and then use getText

Please Help!I have Edit Text field whose inputType is number. On the click of Submit button in the firstActivity I want to send the value via Bundle to next activity. I want to make the field compulsory. Before sending the value I am checking if the…
0
votes
1 answer

How to change language gettext in php?

I got a multilingual website. Each domein has its own language. Sometimes i would like to echo one sentence in multiple languages. I'm using wordpress as site engine. Does anyone know if something like this is possible with gettext?
Roeltm
  • 55
  • 4
0
votes
2 answers

Django translations for different Industries/applications

We're developing an application which will serve multiple industries. I'm hoping to use django's i18n functionality to accomplish two things: Translation to different languages (standard). Translation to different industries (much less…
SColvin
  • 11,584
  • 6
  • 57
  • 71
0
votes
1 answer

How to disable references in poedit

How to disable adding references to *.po file? in POedit? poedit adds references, but do not need it. Example of my gettext file: #: ../../../tests/cases/Command/SysInfoTest.php:49 #: ../../../tests/cases/Command/SysInfoTest.php:238 #:…
0
votes
2 answers

How do I get strings from a JSON file?

I'm writing a internationalized desktop program written in Vala where a use an extern JSON file to store a list of languages. I'm using gettext for l10n so if I get the string from the json file and I do something like _(string_var) I could get the…
chavaone
  • 183
  • 3
  • 9
0
votes
2 answers

What is the purpose of dcgettext?

The GNU gettext manual describes the dcgettext function as follows: Both take an additional argument at the first place, which corresponds to the argument of textdomain. The third argument of dcgettext allows to use another locale category but…
R.. GitHub STOP HELPING ICE
  • 208,859
  • 35
  • 376
  • 711
0
votes
2 answers

Backport .po file translations

I want to backport translations, so lets say I have master.po and v1.po, where master.po has more translations than v1.po (but also differing msgids). So I want to update v1.po by copying all the translations from master.po where the msgid matches.…
user2291758
  • 715
  • 8
  • 19
0
votes
0 answers

Gettext php doesnt translate all strings

Another gettext problem here. Gettext works, and everything is seemingly set up correctly. However, I am now faced with the problem that some strings are not being translated on the website, despite being translated in the .po files. Gettext for…
Ntikki
  • 293
  • 3
  • 15
1 2 3
99
100