[REBOL] Re: locale Re: Re: %Maoww_english.r
From: petr:krenzelok:trz:cz at: 24-Aug-2002 12:07
Carl Read wrote:
>Let's. (:
>
>A script's header is supposed to contain its file-name, so joining
>that (minus the .r) to the user's language name would be the way to
>get the file-path.
>
>Maybe the language definitions should be an object? ie, create the
>default so...
>
>locale-words: make object! [
> menu-item-1: "Open..."
> menu-item-2: "Close"
>]
>
>and then if there's a file to over-ride the default, just load it
>and...
>
>locale-words: make user-locale
>
>user-locale being a block of set-word!/any-type! pairs. That'd have
>the advantage of keeping any default words that were missing from
>user-locale.
>
hmm, that's the question of using block vs. object. if you use object -
you define words. Block offer more dynamic aproach imo:
locale-words [menu-item-1 "Open..."]
few handlers could be defined as well - remove-locale-item,
add-locale-item, replace-locale-item or so ...
but generaly - it is not probably so important, if it will be block or
object ...
Now let's say you use IOS - you centrally switch it to Czech language.
So - each app should know somehow, it should try to use Czech language
catalogue. How to do it?
And also - versioning - reblets are changed dynamically - so, someone
posts new reblet, containing new UI item. You switch to Czech language,
but your catalogue is old, and item not found - will you a) stay with
english (default) language b) use Czech (selected) one, and on missing
items use default language, so e.g. new button will be in English, while
other UI items will be in Czech?
-pekr-