gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Localization of special directories


From: Fred Kiefer
Subject: Re: Localization of special directories
Date: Wed, 13 Mar 2013 22:41:05 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3

On 13.03.2013 12:03, Luboš Doležel wrote:
On Wed, 13 Mar 2013 10:09:15 +0100, Riccardo Mottola wrote:
Hi,

I'd like to Localize the "special" directories handled by
NSWorkspace, specifically to return the appropriate custom icon.
That is, if the Directory has a localized name, it should get the
proper icon anyway!

When I implemented this in NSWorkspace (not in GWorkspace, thus it is
available to all applications) I had two class of Directories.

"Images" and "Music" are simple. For example:

  [folderPathIconDict setObject: @"MusicFolder"
    forKey: [NSHomeDirectory () stringByAppendingPathComponent:
@"Music"]];

just Localizing "Music" should do the trick, thus I would have a
localizable string for NSWorkspace.

For other directories, like the Desktop or the Document, I use NS
constants:
Dir = NSSearchPathForDirectoriesInDomains(NSDesktopDirectory,
    NSUserDomainMask, YES);


I wonder, also with mac compatibility, if I NSDesktopDirectory should
return already the localized string (I guess yes, but how?) or if I
should use that constant to localize it. It would make less sense
though.

Riccardo

Hi,

on Linux & related systems, the correct way is to use
~/.config/user-dirs.dirs

I couldn't find more information on this, but I think I've heard about
desktop environments (in the future) using only English folder names
physically, but doing some trickery to display localized names.

More information may be found on this page:
http://freedesktop.org/wiki/Software/xdg-user-dirs

But none of the files mentioned there is found on my OpenSuse 12.2 system.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]