gettext

Django internationalization for admin pages - translate model name and attributes

Django's internationalization is very nice (gettext based, LocaleMiddleware), but what is the proper way to translate the model name and the attributes for admin pages? I did not find anything about this in the documentation: http://docs.djangoproject.com/en/dev/topics/i18n/internationalization/ http://www.djangobook.com/en/2.0/chapter...

Localization in Perl using gettext and Locale::TextDomain, with fallback if Locale::TextDomain is not available

The "On the state of i18n in Perl" blog post from 26 April 2009 recommends using Locale::TextDomain module from libintl-perl distribution for l10n / i18n in Perl. Besides I have to use gettext anyway, and gettext support in Locale::Messages / Locale::TextDomain is more natural than in gettext emulation in Locale::Maketext. The subsecti...

How to efficiently work with gettext PO files when making small edits to large text values

Looking for tips and/or tools on how to efficiently work with gettext PO files when making small edits to large msgid values. Example: We have lots of multi-sentence/multi-paragraph messages that are stored in our PO message catalog files. If we make a very minor change to a message, perhaps editing a single sentence or even correcting ...

i18n with webpy

Hello, i Have a problem with i18n, using webpy. I have followed this : http://webpy.org/cookbook/i18n_support_in_template_file So, in my .wsgi there is : #i18n gettext.install('messages',I18N_PATH,unicode=True) gettext.translation('messages',I18N_PATH,languages=['fr_FR','en_US']).install(True) So i ran : pygettext.py -a -v -d messa...

How do I configure Poedit to read XSL files

This is one line in my code: <xsl:value-of select="php:function('gettext','Hello world')" /> How do I get Poedit to automatically find the text string from the .xsl file? ...

How do I view message context in Lokalize immediately in a pane?

All I see is just the file name and line number, as highlighted in the screenshot above. Activating the link shows a dialog box with the information: »Cannot open source files: no scripts to do so are currently loaded. Refer to the Lokalize handbook for script examples and how to plug them into your project.« However, after reading th...

How can I embed gettext po files inside an executable and bind them at runtime?

Hi, I am writing a program that uses get text, and would like to distribute it without the po files. The embedding part is easy, but i could not find a way to bind the catalog from memory. Any help appreciated! Jon. ...

How to ignore PHP break lines with POEdit parser?

I am currently translating my PHP application using gettext with POEdit. Since I respect the print margin in my source code, I was used to writing strings like that: print $this->translate("A long string of text that needs to follow the print margin and since php outputs whitespaces for every break line I do my sites renders...

Django: How to force translation into a given language inside a template ?

In a Django template, I need to transanlate some strings to a specific language (different from current one). I would need something like this: {% tans_to "de" "my string to translate" %} or {% blocktrans_to "de" %}my bloc to translate {% endblocktrans_to %} to force translation to German. I know I can call the following code in a v...

Manage separate translation files (.po) in Django

I am not an expert in Python or gettext utilities. I have a Django project in which I have several modules in the application. I need to maintain separate .po translation files for each module that will be merged in the time deployment. For instance, there is a Dictionary module beside the django-cms-2 module for both of which I want to ...

How to get gettext work on IIS/PHP

I have Win XP + IIS + PHP (fastcgi) installed. I want to use gettext for multilanguage application. My php code (index.php): bindtextdomain('APP', './locale'); textdomain('APP'); And I have following directory structure: src\index.php src\locale\en\LC_MESSAGES\APP.mo src\locale\ru\LC_MESSAGES\APP.mo So, the code works, but only ...

Translating const strings in structure initializers

I'm working with a large code base which uses const strings in structure initializers. I'm trying to translate these strings via GNU gettext with a minimal amount of time. Is there some sort of conversion operator I can add to default_value which will allow Case #1 to work? #include <cstring> template<int N> struct fixed_string { c...

Best practices for externalizing strings in PHP

I've been surprised by how little I've found on externalizing strings in PHP. Does everyone use gettext, or is there some other framework or tool that I'm not aware of? ...

Internationalization for Flex/Flash Apps

What options are there for storing and accessing translated strings in a Flex/Flash application? Ideally, I would like to share translation data with my Django website's internationalization data. This leads me to believe that some version of gettext would be best. But what is the industry standard, and the best implementation and docume...

gettext works in one file and not the other?

Hi. I have a little trouble getting gettext to work. I made a simple test file where I call the translate.php and echo T_("XXXXX") and It get translated, but when I try to use echo T_ in a function it doesn't work.. translate.php: <?php error_reporting(E_ALL | E_STRICT); // define constants define('PROJECT_DIR', realpath('./fun...

poedit and xml files

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. ...

Multi wording site as opposed to multi language, can gettext solve that too?

I have a site which targets several industries. So in one industry the manager would be called "department head" and in the other "inspector". Can I solve this issue with gettext, as it is in a way a multi linguistic problem. ...

Django i18n {% blocktrans %} query

Hey, I have been reading through the django i18n translation documentation and I can't figure out the best way to translate a string that contains html. For instance, the html below. How would I retain <strong></strong> in the blocktrans statement? <p>This email is to acknowledge placement of order number <strong>{{ order.order_num...

how to fetch all msgid and msgstr from .pot file.

I have a app.pot file. And i want to fetch all msgid and msgstr from that file. Is there any specific and proper way to do that?? ...

Can xgettext be used to extract specific domain strings only?

(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...