Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Multilingual Mason

by crenz (Priest)
on May 03, 2003 at 12:23 UTC ( [id://255306]=note: print w/replies, xml ) Need Help??


in reply to Re: Multilingual Mason
in thread Multilingual Mason

Thanks for the suggestions! I will check them out.

I don't understand why you don't have separate pages for every language you need to display.

Different component paths for different languages make lots of sense -- it's a good idea that I will use for headers, footers etc.

However, I previously (years ago) used a system that used different files for different languages, and it's a maintenance nightmare. It's easy to do the initial translation: Just copy en/some.html over to de/some.html and replace all English text with the German translation. However, to make changes, you first change it in one version, then you open the other file, search all the way down to the place where you want to change something, insert the new translation, forget half of the new stuff that you wrote, forget the other change that you made etc.

I'm much happier with the current approach -- it saves me a lot of time and helps me prevent stupid mistakes.

Replies are listed 'Best First'.
Re: Re: Re: Multilingual Mason
by valdez (Monsignor) on May 03, 2003 at 12:55 UTC

      As I said, I like the idea of using components for small blocks of text: Headers, footers, menu items etc. I don't like the idea of doing that for large chunks of text (e.g. paragraphs in a lengthy article). And the problem is -- my webpage is composed mostly of larger chunks of text... I could use a component to retrieve the article, but then I end up with n component files for n languages again.

      With the help of your links, I found Locale::Maketext, which looks very interesting (even more than gettext). Class::Phrasebook might also be useful, but is less versatile. I also found two interesting articles: Localizing your perl programs and Localizing open source software. Especially the first one demonstrates the dilemma of internationalization rather well (and we haven't even talked about localization yet!). I'm glad I only have to handle two languages (maybe three later).

Re: Re: Re: Multilingual Mason
by aquarium (Curate) on May 04, 2003 at 11:02 UTC
    most of the multi-lingual sites that i've seen (not many :) use some kind of macro/make pre-formatter that adjusts the "code" only of the other language versions after you edit the code of say English. this makes for very boring code, as fancy code is kept well away from (language) string assigment, but it does keep things in order. btw use posix character class translations for any s/// m// tr/// etc. a-z --> A-Z doesn't fare that well on Chinese characters. Chris

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://255306]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-26 01:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found