[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-www
Subject:    Re: translation extension? (was: Re: techbase wiki question)
From:       Dominik Haumann <dhdev () gmx ! de>
Date:       2007-04-04 21:09:46
Message-ID: 200704042309.49550.dhdev () gmx ! de
[Download RAW message or body]

On Tuesday 03 April 2007, Dominik Haumann wrote:
> On Saturday 31 March 2007, Stefan Monov wrote:
> > On Saturday 31 March 2007 11:01:59 am Dominik Haumann wrote:
> > > On Saturday 31 March 2007, Stefan Monov wrote:
> > > > > Thinking more about it, it would be easy to write a small
> > > > > mediawiki extension which generates the language bar
> > > > > automatically. The usage would be something like
> > > > >   <translate lang="de,fr" />
> > > > > The extension itself would then generate links to the page/de and
> > > > > page/fr (or _(de), _(fr)). If included in a translated page (e.g.
> > > > > _(de)) it could replace the last characters of the link with the
> > > > > right languages or none for the english version. Much better than
> > > > > hand-writing a translation template for every single page
> > > > > manually.
> > > > >
> > > > > Thoughts? :)
> > > >
> > > > Might as well do a template used like so:
> > > > {{tr|de}}
> > > > {{tr|fr}}
> > > > no need for coding :D
> > >
> > > if you are in the page Bla_(de) and you add {{tr|fr}} there, how does
> > > it replace the _(de) by _(fr)? If that is possible in mediawiki
> > > syntax (probably parser extension) then it of course works without an
> > > extension.
> >
> > I guess you're right.
> > A <translate lang="de,fr"> extension is pretty much the right thing to
> > do.

I had a look: If we do not want i18n templates at all, we have to add a 
<translate lang="de,fr"/> to the english page and all its translations. To 
keep that in sync is not so good. Example: If we now add a 'se', we'd have 
to change all the pages individually to keep them synchronized - this 
clearly will not work.
So we have two approaches:
1. Use templates
The <translate...> will go into a template to be reuable, but that is what 
we have now.
2. Hard code the number of languages in the <translate/> template. Example: 
You translate the MainPage, thus you add <translate/> to the MainPage and 
MainPage_(de). Say we have 20 languages, then the MainPage and 
MainPage_(de) will have a bar with those 20 languages, all but de and en 
links to non-existant pages. This is a bit fuzzy imo.

So we can simply go with approach 1 for now, or do you have other ideas?

I hope I was clear enough :-)

Dominik
_______________________________________________
kde-www mailing list
kde-www@kde.org
https://mail.kde.org/mailman/listinfo/kde-www
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic