Re: kAudioDevicePropertyDeviceName and localisation
Re: kAudioDevicePropertyDeviceName and localisation
- Subject: Re: kAudioDevicePropertyDeviceName and localisation
- From: Jeff Moore <email@hidden>
- Date: Tue, 7 Dec 2004 11:32:15 -0800
The way localization works for strings that drivers present through the
HAL is as follows. The driver provies a resource bundle that has the
appropriate .lprojs in it and tells the HAL where the bundle is via the
kIOAudioDeviceLocalizedBundleKey in the registry entries for the
IOAudioDevice. Then when the HAL needs to retrieve a string, it first
looks in the IORegistry. It takes the string it finds there and uses as
the key to look up the localized version in the resource bundle. If
there is no string in the registry to use as the key, the HAL uses the
key for the registry entry itself to look the string up in the resource
bundle. The HAL uses the process's notion of the current language to
determine what localization to load, although that is hidden from the
HAL by the CF routines it uses.
There is no way to bypass this mechanism short of totally reworking it
yourself. To do that, you'd first need to identify the IOAudioDevice
object that goes with the AudioDeviceID you are using. The HAL doesn't
provide this info, so you'd need to do this correlation by searching
the registry using the UID as the means to identify the registry
entries you're looking for. Then you'd need look up in the IORegistry
the device's resource bundle. Load it and then fetch just the English
localized strings which means you need to parse the .strings stuff
yourself too (fortunately, CF makes this fairly straight forward).
On Dec 7, 2004, at 7:22 AM, Stéphane Letz wrote:
Hi,
I'm using "err = AudioDeviceGetProperty(coreDeviceIDs[i], 0, true,
kAudioDevicePropertyDeviceName, &outSize, (void *)name); " to get the
name of a coreaudio device.
On a french localized application the result is the french name "Audio
integre". How actually is handles this localisation system?
I would like to get the *english* version of the name on a french
localized application.
Is this possible?
Thanks
Stephane Letz
--
Jeff Moore
Core Audio
Apple
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden