[haiku-development] Re: [haiku-i18n] Re: Localization of files and folders

  • From: "Jonas Sundström" <jonas@xxxxxxxxxxx>
  • To: "haiku-development@xxxxxxxxxxxxx" <haiku-development@xxxxxxxxxxxxx>
  • Date: Thu, 17 Feb 2011 18:11:18 +0100

Ingo Weinhold Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
 ...
> Using a real attribute obviously cannot work with multi-user.
> Having a kind of virtual attribute in Tracker would though.
> The data for that attribute could come from some standard API,
> e.g. BEntry::GetLocalizedName(BString&) 
> or BLocaleRoster::GetEntryName(const BEntry&, BString&).

I like the that.
 
> > As for implementation:
> > 
> > Apps would store a list of translated names in their own resources
> > (which are embedded in the executable)
> 
> Why not in a catalog?

I find this data to be very similar to the standard data of the app 
resource, some of which also gets published as attributes.

Having .rdef files in our repo makes the app name translations sort of
more official, canonical. For better or worse. I don't know.

I guess catalogs should work just as well though.

> > and refresh/correct the
> > "sys:trans" attribute when they are run.
> 
> So for an application's name to be displayed in the current locale one 
> would have to start it once?

As the default locale is english, one would of course prepopulate english
strings, and when switching they would be updated, new language attributes
added, old language ones removed, if not needed by another user.

(And a message broadcast to all apps who care to listen.)
 
> > Folder (and file) translation data could be kept in some shared
> > location i.e. in /boot/common, managed and updated by the system,
> > and be applied to all the respective folders when the user changes
> > the language setting. (It could easily update apps the same way.)
> 
> Again, I would use catalogs.

I thought it would be simpler with attributes, but maybe it doesn't
make much of a difference.

/Jonas.


Other related posts: