Skip Menu |

This queue is for tickets about the Locales CPAN distribution.

Report information
The Basics
Id: 77404
Status: resolved
Priority: 0/
Queue: Locales

People
Owner: Nobody in particular
Requestors: dmuey [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.26
Fixed in: (no value)



Subject: A couple of object features
a) Allow objects to be created for locales that do not exist in CLDR whose language part does exist (e.g. es-MX) Object needs to know that its a “fallback” object (e.g. locale=>es_mx, is_fallback => es)and various methods need to understand that and act accordingly (e.g. get_native_language_from_code() $always_return default to true) b) Add '_plural_vat_args_count' && '_supports_special_zeroth' to 'plural_forms' data and/or method?
#1 would need to be an option not the default new($tag,1) or new_lenient() etc
#2: something simple like this (or do the same logic to set in object so it not calculated at runtime each time its called): sub supports_special_zeroth { return 1 if $_[0]->get_plural_form(0) eq 'other'; return; } sub plural_category_arg_count { return scalar ($_[0]->get_plural_form_categories()); }
for #1, we should also add POD that better describes what makes a locale usable in this module: namely, it is in CLDR, en has data for it. soft locales can be documented above or under this heading
On Tue Oct 16 18:53:05 2012, DMUEY wrote: Show quoted text
> for #1, we should also add POD that better describes what makes a > locale usable in this module: > > namely, it is in CLDR, en has data for it. > > soft locales can be documented above or under this heading
on iother words make it easier to find/link to “I am using a locale code that I know exists in the CLDR but I can't use it anywhere in Locales”
need a lookup list for * non-locale locales: 'und', 'zxx', 'mul', 'mis', 'art' * 'en' alias (LMU ?) 'en_us', 'i_default' use them where appropriate …
On Tue Oct 16 18:59:26 2012, DMUEY wrote: Show quoted text
> need a lookup list for > > * non-locale locales: 'und', 'zxx', 'mul', 'mis', 'art' > * 'en' alias (LMU ?) 'en_us', 'i_default'
get_language_codes() needs a corresponding get_loadable_language_codes() that returns the same info but weeds out the non-locale-locales, aliases, and ones you can not turn into a Locales.pm object (precompiled list so we don't have to try to created 150 objects …)
done in v0.27 just uploaded to CPAN