473,466 Members | 1,388 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Adding localization feature to a web-project

Hi,

I'm doing a web-project using Python and was wondering how I can add a
localization option to my web-pages? Does anybody have any hints or ideas?
I'm using simpleTal/es as a template-engine.

I need to let the user specify (or download a language pack ) and customize
central text elements in a web-portal according to his/her needs.

If anybody can share some thoughts or examples on how they did this or ideas
on a system which makes such localization packs easy to maintain, that would
help alot.

Thanks in advance,
Thomas
Jul 18 '05 #1
3 3031
Am Wed, 05 Nov 2003 16:16:48 +0100 schrieb Thomas Weholt:
Hi,

I'm doing a web-project using Python and was wondering how I can add a
localization option to my web-pages? Does anybody have any hints or ideas?
I'm using simpleTal/es as a template-engine.

I need to let the user specify (or download a language pack ) and customize
central text elements in a web-portal according to his/her needs.

If anybody can share some thoughts or examples on how they did this or ideas
on a system which makes such localization packs easy to maintain, that would
help alot.


I do it like gettext (with a _() method), without using gettext:

_("the sun shines") --> "Die Sonne scheint"

Pseudo-Code:

def _(string):
user=get_user() # Problem
if user.lang=="de":
return de.translations[string]

File de.py:
translations{
"the sun shines": "Die Sonne scheint",
...
}

If you look at the "Problem" above: You need
to get to the user-data without a root-object.
This is a problem if you use zope. At least
I found no good solution.

I switched to quixote and there I have a customized
publisher, which puts some parts into the global namespace
(in a thread-save way).

Hope that's helps,
thomas


Jul 18 '05 #2
Hi,

if you use zope, you can install a product named Localizer. I
have tested it and it works pretty good. The main idea of this
product is to define an object that contains two or more
versions of the page (or images if you want), then it will
automatically select the version according to your browser
prefferences or a language cookie (You can set the precedence
order).

If I'm not bad, for interface elements, like buttons and error messages,
you can define a resource table with the translation of each message.

Regards,
Josef

"Thomas Weholt" <20**@weholt.org> wrote in message
news:rr********************@news2.e.nsc.no...
Hi,

I'm doing a web-project using Python and was wondering how I can add a
localization option to my web-pages? Does anybody have any hints or ideas?
I'm using simpleTal/es as a template-engine.

I need to let the user specify (or download a language pack ) and customize central text elements in a web-portal according to his/her needs.

If anybody can share some thoughts or examples on how they did this or ideas on a system which makes such localization packs easy to maintain, that would help alot.

Thanks in advance,
Thomas

Jul 18 '05 #3
It seems like you can also use it directly from python without
installing zope (or at least that are their plans):

http://in-girum.net/pipermail/locali...ne/000020.html

"Josef Meile" <jm****@hotmail.com> wrote in message
news:3f********@pfaff2.ethz.ch...
Hi,

if you use zope, you can install a product named Localizer. I
have tested it and it works pretty good. The main idea of this
product is to define an object that contains two or more
versions of the page (or images if you want), then it will
automatically select the version according to your browser
prefferences or a language cookie (You can set the precedence
order).

If I'm not bad, for interface elements, like buttons and error messages,
you can define a resource table with the translation of each message.

Regards,
Josef

"Thomas Weholt" <20**@weholt.org> wrote in message
news:rr********************@news2.e.nsc.no...
Hi,

I'm doing a web-project using Python and was wondering how I can add a
localization option to my web-pages? Does anybody have any hints or ideas? I'm using simpleTal/es as a template-engine.

I need to let the user specify (or download a language pack ) and

customize
central text elements in a web-portal according to his/her needs.

If anybody can share some thoughts or examples on how they did this or

ideas
on a system which makes such localization packs easy to maintain, that

would
help alot.

Thanks in advance,
Thomas


Jul 18 '05 #4

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

Similar topics

3
by: Eric | last post by:
Hi, I'm just looking into the samples that are delivered withthe Enterprise Localization Framework/Toolkit. I have set it up and it all works fine. But.. now i have a question. I read a...
0
by: guy | last post by:
I am experimenting with the Enterprise Localization Toolkit. Using the Designer and Translator feature, I am able to include a new label in the Basic sample. Apparently, this can also be...
6
by: Rental | last post by:
I'm having the sam problem as described below with the Localization toolkit. Does anyone know if there is a solution to this problem. --->When attempting to generate resource dlls with...
0
by: Buu Nguyen | last post by:
Hi there, I'm getting trouble with localization in my asp.net website. I use ..NET locationlization structure, with dll resource file for each language, and the website work perfectly in my...
5
by: Samuel | last post by:
Hi, I am running into a problem of mixing UICulture = auto and allowing users to select culture using a dropdown list. I am detecting a querystring, "setlang", and when found, setting the...
8
by: Olivier Matrot | last post by:
I encounter a problem with Localization features in ASP.NET 2.0. Is seems that the framework is not able to manage neutral cultures such as 'fr', or 'de'. Those are the culture sent by default from...
2
by: walter | last post by:
Hi there, I'm wondering if it's possible to store the .net resource in database instead of resx file? Our site is a multi-lingual site ,storing text in resx file give us a burden on the website...
0
by: shapper | last post by:
Hello, Sometime ago I followed an article (I believe MSDN) related with localization in Asp.Net 2.0. To make pages localization I create a class named Localization: 1 Public Class...
4
by: coderr | last post by:
Hi all, i have simple question, suppose that we have a ASP.NET web site with lots of local resource files, we can simple delete all of the resource files (resx). Question is, how can remove all of...
1
by: =?ISO-8859-1?Q?Adri=E1n_E=2E_C=F3rdoba?= | last post by:
I was learning how to use localization in the web sites by reading "Walkthrough: Using Resources for Localization in ASP.NET" from the Help in VS2005. This Walkthrough talk about localization of...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.