Re: nsusername localized?
Re: nsusername localized?
- Subject: Re: nsusername localized?
- From: "Sean McBride" <email@hidden>
- Date: Tue, 11 Jan 2005 11:05:21 -0500
- Organization: Rogue Research
On 2005-01-10 16:17, Matthew Pease said:
> I'm getting close to shipping my app. Just want to know if
>NSUserName can be a localizable string. My app uses the STL type
>"string" internally for paths.
>
> All of its pathing involves creating / loading files to/from the
>~UserName/Library/Application Support/MyApp/ folder.
I trust you are getting this path from FSFindFolder() or some similar
API? It will help insulate you from that path changing locations or names.
> As I understand it, on a localized system the "Library/Application
>Support" part will always be in english, regardless of the presented
>language of the system.
The Finder may display localised names for those folders, but the actual
filepaths (from the filesystem's view) do not change. Of course, this
may change in the future, which is why FSFindFolder is critical.
> Might NSUserName be some funky localized string that the stl string
>type might choke on?
I wouldn't think NSUserName()'s result would depend on localisation. The
docs don't seem to say anymore than "Returns the logon name of the
current user".
I get the feeling you are using NSUserName() to build a path. Don't do
that. Use FSFindFolder.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden