473,246 Members | 1,449 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,246 software developers and data experts.

GETTEXT (not really a question)

Hi gang,

I was thinking about further localization of my app.

There is a problem with gettext since it is not thread aware, but I
don't mind it, since if any other page changes the localization to its
liking, mine will change it again upon (re)loading, and everyone is
happy, as far as I'm concirned :)

The problem I'm facing now is this:

I'd like to translate as much of the site as I can, and I've created a
templating system for it. But which of the 2 systems would you prefer:

1.) Having one template file with the general design, and then if there
are a few picture headers, translate them through gettext, something
like:
@TMPL_MAIN_HEADER = _( 'pictures/header_en.png' );
and let it be translated through gettext to, for example,
'pictures/header_fr.png',

or

2.) Create a subdirectories in the template directories and duplicating
the design, changing only the pictures in it? Like:
templates/en/contact.tmpl
templates/fr/contact.tmpl

The first solution is quite easier, although gettext was probably not
intended to be used in that way :)

As I've said, it's not really a burning question, more like an
invitation to e-brainstorm :) So what do you think about it?

-- Evanescent Lurker --

Jul 17 '05 #1
1 1269
<ev***************@gmail.com> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com...
Hi gang,

I was thinking about further localization of my app.

There is a problem with gettext since it is not thread aware, but I
don't mind it, since if any other page changes the localization to its
liking, mine will change it again upon (re)loading, and everyone is
happy, as far as I'm concirned :)

The problem I'm facing now is this:

I'd like to translate as much of the site as I can, and I've created a
templating system for it. But which of the 2 systems would you prefer:

1.) Having one template file with the general design, and then if there
are a few picture headers, translate them through gettext, something
like:
@TMPL_MAIN_HEADER = _( 'pictures/header_en.png' );
and let it be translated through gettext to, for example,
'pictures/header_fr.png',

or

2.) Create a subdirectories in the template directories and duplicating
the design, changing only the pictures in it? Like:
templates/en/contact.tmpl
templates/fr/contact.tmpl

The first solution is quite easier, although gettext was probably not
intended to be used in that way :)

As I've said, it's not really a burning question, more like an
invitation to e-brainstorm :) So what do you think about it?

-- Evanescent Lurker --


I have a thing against duplication. (That's why they invented include files
:-) ). Your second choice means that if you find a bug somewhere, it has to
be fixed in every subdirectory rather than just once.

Shelly
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dave Patton | last post by:
Can someone point me to a definitive source for the answers to the following two questions: 1) In an environment with Redhat Linux 2.4.21-27.0.1, Apache 1.3.31, PHP 4.3.10, and GNU gettext...
3
by: Rolf Hemmerling | last post by:
Hello ! Beginner's question: Howto access .RC/.RES Ressource files with portable C++ code ( BCC,MSVC,GNU-C++, OpenWatcom) ? I just wanna access "local language strings", so that I may...
13
by: cantabile | last post by:
Hi, I'm failing to make it work but can't find out what's wrong. Here's what I do : ================ test.py import gettext gettext.install('')
2
by: Thomas W | last post by:
I'm trying to wrap my head around the docs at python.org related to the gettext-module, but I'm having some problem getting it to work. Is there any really simple, step-by-step on how to use this...
4
by: Mike P2 | last post by:
Hi. Does anyone here have experience with PHP gettext functions? I'd like to know how they work better. Also, is gettext more efficient than serializing the language strings into language files and...
1
by: James T. Dennis | last post by:
You'd think that using things like gettext would be easy. Superficially it seems well documented in the Library Reference(*). However, it can be surprisingly difficult to get the external details...
6
by: =?iso-8859-1?B?QW5kcuk=?= | last post by:
I've encountered a problem using gettext with properties while using a Python interpreter. Here's a simple program that illustrate the problem. ============== # i18n_test.py: test of gettext &...
2
by: paolob | last post by:
Hi to all, I'm running php 5.2.5 on Debian etch, with apache 2.0.56. I need to include, in php.ini, gettext.so library but I didn't find anything. I've already install: apt-get install gettext...
4
by: Abin k Vattakkattu | last post by:
Sir I am confused gettext() function is not working in my php.i try articles to enable it but did not get any result
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.