I'm looking at using xgettext to aid translation of large codebase, and I have two questions:
if I have one .po file per-language, is there an easy way to update them all using a single xgettext scan of the codebase, or must I run xgettext once for each language?
if I add the target langauge to the .po file header with poedit, xgettext...
I'm internationalizing a python program and cant get plural forms into the .pot file. I have marked string that require plural translations with a _pl() eg.
self.write_info(_pl("%(num)d track checked", "%(num)d tracks checked",
song_obj.song_count) % {"num" : song_obj.song_count})
Then I'm running:
xgettext --lang...
In our JS files we use the following format for Gettext translation:
var str1 = '!t[The text that should be translated]';
var str2 = '!t[Some more text]';
This JS files will be parsed using PHP and the parsed strings get translated via Zend Framework Zend_Translate. The generated JS looks like this:
var str1 = 'The text that should...
We have a multilingual (PHP) application and use gettext for i18n. There are a few classes in the backend/model that return messages or message formats for printf().
We use xgettext to extract the strings that we want to translate.
We apply the gettext function T_() in the frontend/view - this seems to be where it belongs. So far we ke...
django-admin.py makemessages dies with errors "warning: unterminated string" on cases where really long strings are wrapped:
string = "some text \
more text\
and even more"
These strings don't even need to be translated - e.g. sql query strings.
The problem goes away when I concatenate the string, but the result l...
Complete C++ i18n gettext() “hello world” example shows a standard way to handle messages in a C++ program using gettext(). The message catalogs are stored in Portable Object files based upon a Portable Object Template file created directly from the C++ source code using xgettext, msginit and msgfmt. What is the corresponding method for ...
Using --extract-all with xgettext does not work with plurals. Using the answer to I18n C++ hello world with plurals as the C++ code here are two tests using xgettext.
cat >helloplurals.cxx <<EOF
// hellopurals.cxx
#include <libintl.h>
#include <locale.h>
#include <iostream>
int main (){
setlocale(LC_ALL, "");
bindtextdomain("hel...
I have a few questions:
I know what gettext is. I've read a few posts where they mentioned xgettext and was curious as to what is the difference between the two.
How can I install xgettext on Windows?
And finally, does anybody have a tutorial on how to install the library php-gettext http://savannah.nongnu.org/projects/php-gettext/ ...
Summary :
I have a project using GNU Autotools. I have a pot file. I need to update it. Is there a magical "make" task that run xgettext for me (I'm lazy ?)
Verbose version :
Hi
I am trying to setup a project using GNU autotools and gettext.
I'm trying to follow the 'lazy' path (that is, only writing configure.ac, Makefile.am, a...
How can I compile a .po file using xgettext with PHP files with a single command recursively?
My PHP files exist in a hierarchy, and the straight xgettext command doesn't seem to dig down recursively.
...
I can use jinj2 templates with django via render_to_response defined as below
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.http import HttpResponse
from django.template import TemplateDoesNotExist, Context
from django.utils import translation
from itertools import chain
from jinja...
Hello,
Is there a good, open-source, documented CMake module for gettext support?
I mean:
Extracting messages from sources
Merging messages to existing translations
Compilation of mo-files
Installation of mo-files.
Because plain macros that CMake provides are quite... useless for real l10n support.
Anybody?
Edit: I created my own...
Hello,
How to configure poedit to extract strings from xml file?
I have Zend Framework navigation items in .xml like this:
<entry-i>
<label>Text to translate</label>
<params>
...
<params>
<entry-i>
And I want poedit to read just messages from <label>s.
...
(Really surprised this isn't answered anywhere online; couple posts over the past few years with a similar question, but never answered. Let's hope the Stackoverflow crew can come to the rescue)
Situation:
When using gettext to support application localization, one sometimes wishes to specify a 'domain' with dgettext('domain', 'some t...