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_HEAD ER = _( '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 -- 1 1296
<ev************ ***@gmail.com> wrote in message
news:11******** *************@g 47g2000cwa.goog legroups.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_HEAD ER = _( '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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 0.14.1,
will using PHP's gettext support along with the
GNU gettext utilities work properly?
For example, I've seen references to the translated
strings in .mo files not always being what appears
|
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 replace the
..RC file to compile a version of my software for a different language.
|
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('')
|
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 module
available?
This is my script so far :
import gettext
gettext.install('test2', '.', unicode=1)
lang1 = gettext.translation('test2', languages=)
|
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
unserializing them at each request?
I found this on Google saying that some guy sped up gettext, but I
have no idea how fast it was in the first place:
http://savannah.nongnu.org/forum/forum.php?forum_id=3648
I was planning to just...
| |
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 right.
* http://docs.python.org/lib/node738.html
Here's what I finally came up with as the simplest instructions, suitable
for an "overview of Python programming" class:
Start with the venerable "Hello, World!" program ... slightly modified
|
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 & properties
import gettext
fr = gettext.translation('i18n_test', './translations',
|
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
apt-get install php-gettext
apt-get install php5-cli
apt-get install php5 php5-common
|
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
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |