Re: thoughts on awki development

"David W. Talmage" <[email protected]> Wed, 06 Apr 2005 10:56:59 -0400
Newsgroups gmane.comp.web.wiki.awkiawki.user
Message-ID <[email protected]>
Dear Atte (and list!):

It's swell to see someone interested in AwkiAwki.  Thank you!

>mentioned on http://www.jw-stumpel.nl/wiki.html. I also translated the 
>UI to danish and did a few minor things.

How easy would it be to make the language of the UI configurable?  I
can see it working like this: Some variable in awki.conf selects the
language (there's a standard for that, isn't there?).  Use an array of
arrays to hold the UI messages using standard keys.  E.g.

The special_history strings in special_parser.awk are "version",
"date", "comment", "view version", "edit version", "diff to current".
So maybe the English version looks like this:

language="EN"

messages["EN"]["special_history"]["version"]="version"
messages["EN"]["special_history"]["date"]="date"
messages["EN"]["special_history"]["comment"]="comment"
messages["EN"]["special_history"]["view"]="view version"
messages["EN"]["special_history"]["edit"]="edit version"
messages["EN"]["special_history"]["diff"]="diff to current"

You could go something like

localized_messages=messages[language]

I suppose the right way is to stick each collection of localized
messages in a separate file that gets loaded by the BEGIN block.  Some
function would open the file dictated by the language variable and
return the array of localized messages.

Atte, if you'll figure out the scheme and do it for Danish, I'll do
the English version.

>doing alot of the same stuff. Therefore I think it would be better to 
>implement these changes into awki itself, and allow choices to be made 
>from awki.conf.
>
>Would there be any interrest in such a work? I could set up a wiki for 

Sure!  Go for it.

David Talmage


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click