Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: locale

From: zokie::libero::it at: 25-Aug-2002 20:30

Hello Petr On 24-Ago-02, Petr Krenzelok wrote:
> Yes, I know. But then we have to decide, if we add system-wide > directories as /catalogues, /skins, etc., or each app will use its own > directory? Because - in rebol, the app = few KB script in many cases, so > maybe it would be sufficient to look at app directory subdir, or > directly at directory where script resides (no /catalogues subdir, just > catalogue files)
I think to put %app-name.r & %catalog/ in the same directory, so they maybe installed, copied, removed together :) Yes! Rebol applications requires few KB and to collect many catalogs colud enlarge them, but we should consider to distribute them with few or only one catalog file (p.e. english one) and modify make-catalog function or add another function to autodownload prefered catalog file(s) if in the user setup are specified different languages, so only first application launch needs to start with "wrong" catalog and download correct one if we can't do catalogs download during app installation and then re-define catalog. Another approch could be this: an application is distributed with all avaible catalog files and on the first launch are removed unused ones or user force their deletion. I think first solution is the best one :) Do you want a global locale/catalog directory? No problem!! app-name-language.cat works fine even with global locale/catalog directory until two or more application haven't the same "app-name" :) I've an opened mind: that was only my first experiment on "Rebol Scripts Localization" not the ultimate solution :)
> we could e.g. use app-name.czech.cat or even app-name.czech and use > suffix? func to get language name. But it could look confusing having
Their are both valid solution, but I think .cat suffix is better to make searches or use wildcard ;)
> app-name.r containing app itself, default catalogue and app-name.czech > to contain only language catalogue, not script ...
If app-name.r contains code & default catalog we may waste KB, i.e. I'm Italian and I like use Italian Language but default catalog is Czech, source code contains Czech strings definition even if at runtime them will be replaced by Italian ones, but they are still there and even on harddisk! Otherwise if all catalog are external file I could delete Czech and all other unused catalogs, app-name.r will be as tiny as it needs to be and only one or few catalogs will be stored on harddisk. To have default catalog as an external file may help translators to make their dirty job :)
> The problem is - whatever aproach si possible. The only question is, > what way to go ... > > And also - don't forget to somehow check for the version needed? So if
No, I don't forgotten it, see my other post, version number is another field in block definition ;) Regards -- "Where did you get all those facts!?!"