I'm in a django website's I18N process.
I've selected two potentially good django-apps :
django-modeltranslation wich modifies the db schema to store translations
django-dbgettext wich inspect db content to create .po files and uses gettext
From your point of view, what are the pros and cons of those two techniques ?
...
I have these two adjacent lines of code:
<td><?php echo __('Product', 'wpsc'); ?>:</td>
<td><?php echo __('Quantity', 'wpsc'); ?>:</td>
And these translations in the .po file
msgid "Product" // Translates
msgstr "Produkt"
msgid "Quantity" // does not translate
msgstr "Antall"
One string shows up translated on the webpage, the o...
I have a program where i18n is handled by gettext. The program works fine, however for some reason I need to know the name of the locale used by gettext at runtime (something like 'fr_FR') under win32.
I looked into gettext sources, and there is a quite frightening function that computes it on all platforms (gl_locale_name, in a C file ...
Online editing gettext files, is it possible?
I use gettext for all my PHP projects, but sides with a minor problem, want to mine user may translate my language from as Danish to Norwegian, but in this case it enste I know is that I need to export my file from Poedit there is any. other software that can export / import my files? for Po...
i have some old php files which i'd like to convert to use gettext.
those files have a content like this :
$LD = 'Some String';
$Another = 'some other ~n~ string';
i have to substitute all the $LD, $Another in the files where they are declared with something like :
_('Some string');
hacking a bit a created some sort of regexp to f...
We are in the process of making our website international, allowing multiple languages.
I've looked into php's "gettext" however, if I understand it right, I see a big flaw:
If my webpage has let's say "Hello World" as a static text. I can put the string as <?php echo gettext("Hello World"); ?>, generate the po/mo files using a tool. T...
I am working on a large multilingual website and I am considering different approaches for making it multilingual. The possible alternatives I can think of are:
The Gettext functions with generation of .po files
One MySQL table with the translations and a unique string ID for each text
PHP-files with arrays containing the different tra...
I've trying to use Zend_Translate from Zend Framework
I am using "POEdit" to generate "gettext" translation files.
My files are under /www/mysite.com/webapps/includes/locale (this path is in my include path).
I have:
pictures.en.mo
pictures.en.po
(I plan on having pictures.es.mo soon)
It all works fine if I manually do addTranslation...
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 GNU libiconv not in use but included iconv.h is from libiconv
The libiconv web page tal...
Hi all,
on my search for a fast but comfortable web server I dropped into the homepage of EmbedThis(TM) AppWeb(TM) HTTP server. This one has 2 licencse models, GPLv2 and a commercial one with support.
On the first view it looks good: the footprint is not too big, it is fast and it has a lot of configuration otions. The most important t...
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...
I have some structure in Python:
> gender=( ('0','woman'), ('1','man') )
I want to translate it before I will display it in Django template. Unfortunately, below solution doesn't work:
> from django.utils.translation import
> ugettext_lazy as _
>
> gender=( ('0',_('woman')),
> ('1',_('man')) )
What shall I do to translate this? I ...
It seems to me that there must be some public domain collection of gettext compatible PO files that we could search for 1:1 or fuzzy translations for strings commonly used in software applications?
Is there a technical and copyright friendly way to query services like Google's Translator Toolkit, LaunchPad, Mygengo, etc. to find transla...
I'm cleaning up some localisation and translation settings in our PyGTK application. The app is only intended to be used under GNU/Linux systems. One of the features we want is for users to select the language used for the applications (some prefer their native language, some prefer English for consistency, some like French because it so...
Looking for best practice advice on what string substitution technique to use when using gettext(). Or do all techniques apply equally?
I can think of at least 3 string techniques:
1) Classic "%" based formatting:
"My name is %(name)s" % locals()
2) .format() based formatting:
"My name is {name}".format( locals() )
3) string.Templa...
We're evaluating Babel 0.9.5 [1] under Windows for use with Python 2.6 and have the following questions that we we've been unable to answer through reading the documentation or googling.
1) I would like to use an _ like abbreviation for ungettext. Is there a concencus on whether one should use n_ or N_ for this?
n_ does not appear to w...
I'm looking for a front-end to google translate that supports translating GNU gettext PO files with NGETEXT style plurals, eg. msgid_plural, msgid[0] ... msgid[n].
I've found several free translation services for PO files [1], but none of these services support ngettext style plural strings. Our PO files have a fair number of plurals th...
I have a website. I'm trying to get gettext to work so that my English, Sweden and Norway sites can come up. I can't get it to work. What have I done wrong?
This is my config code:
// define constants ( defualt - danish )
$lang = 'da_DA';
$lang_short = '';
$lang_prefix = 'da';
if ( isset( $_GET['lang'] ) )
{
switch( $_GET['lang'...
We're using the Python based Babel gettext utilities. Is there any technique we can use to make sure that translator comments and old ("obsolete") translations (marked with #~) in PO files are preserved across PO file updates?
Thank you,
Malcolm
...
How can I extract all translations from a .po or .mo file?
I need to create an array of all translations that are inside.
...