Locale Library: quite some questions...

Discuss any general programming issues here
Post Reply
p-OS
Posts: 167
Joined: Mon Nov 01, 2010 11:56 pm

Locale Library: quite some questions...

Post by p-OS »

I try to understand better how Hollywood Locale Library works.

What is the result of GetSystemLanguage() and GetSystemCountry() if it is different then the internally supported values?
0 ? A negative error number ? Nil ?

On non amigaoid platforms only the languages are supported, that are in this list:
https://www.hollywood-mal.com/docs/html ... guage.html

Is that correct ?

What is the situation on amigaoid platforms ? Does it internally simply pass the parameters to the appropiate locale.library functions ?
Thus:
Does it support also languages not contained in the internal Hollywood list ?
Does it take care of AmigaOS/MorphOS/AROS feature to have more than one system language (with different prioritiy of course) at the same time ?
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Locale Library: quite some questions...

Post by airsoftsoftwair »

p-OS wrote: Sun Feb 23, 2020 10:13 pm I try to understand better how Hollywood Locale Library works.

What is the result of GetSystemLanguage() and GetSystemCountry() if it is different then the internally supported values?
0 ? A negative error number ? Nil ?
You will get #LANGUAGE_UNKNOWN or #COUNTRY_UNKNOWN, respectively.
p-OS wrote: Sun Feb 23, 2020 10:13 pm On non amigaoid platforms only the languages are supported, that are in this list:
https://www.hollywood-mal.com/docs/html ... guage.html
Is that correct ?
Yes.
p-OS wrote: Sun Feb 23, 2020 10:13 pm What is the situation on amigaoid platforms ? Does it internally simply pass the parameters to the appropiate locale.library functions ?
On Amigaoids, the language is determined by examining loc_LanguageName of the default locale and the country is determined by the country code in loc_CountryCode of the default locale.
p-OS wrote: Sun Feb 23, 2020 10:13 pm Does it support also languages not contained in the internal Hollywood list ?
No. In case the loc_LanguageName can't be matched to any of those constants, you will get #LANGUAGE_UNKNOWN as the result.
p-OS wrote: Sun Feb 23, 2020 10:13 pm Does it take care of AmigaOS/MorphOS/AROS feature to have more than one system language (with different prioritiy of course) at the same time ?
No, that's currently not supported.
Post Reply