cpan Locale-Codes 3.10

latest releases: 3.78, 3.77, 3.76...
14 years ago
  • NEW CODE(s)

  • Reorganized code
    Moved support files into the Locale::Codes namespace.

    The work done in each of the Locale::XXX modules was virtually
    identical to each other. It has all been moved to a central module
    and the Locale::XXX modules are now just wrappers.

  • (!) Changed XXX_code2code behavior slightly
    In previous versions, passing in the same code set for both code set
    arguments would automatically return undef. For example:

     country_code2code('bo',LOCALE_CODE_ALPHA_2,LOCALE_CODE_ALPHA_2);
        => undef
    

    This doesn't seem like reasonable behavior, so it has been changed
    to allow the same code set:

     country_code2code('bo',LOCALE_CODE_ALPHA_2,LOCALE_CODE_ALPHA_2);
        => 'bo'
    

    Note that if an invalid code is passed in, undef will still be
    returned:

     country_code2code('bol',LOCALE_CODE_ALPHA_2,LOCALE_CODE_ALPHA_2);
        => undef
    
  • Added many semi-private routines
    Previous versions had only two semi-private routines: rename_country
    and alias_code which had the ability to modify the internal data in
    a couple very limited ways. It was requested (in an anonymous
    posting by someone named Steve and also by Steve Hay) that better
    support for modifying internal data, so a full set of routines were
    added.

    The full set of routines includes:

     rename_country
     rename_language
     rename_currency
     rename_script
    
    
     add_country
     add_language
     add_currency
     add_script
    
    
     delete_country
     delete_language
     delete_currency
     delete_script
    
    
     add_country_alias
     add_language_alias
     add_currency_alias
     add_script_alias
    
    
     delete_country_alias
     delete_language_alias
     delete_currency_alias
     delete_script_alias
    
    
     rename_country_code
     rename_language_code
     rename_currency_code
     rename_script_code
    
    
     add_country_code_alias
     add_language_code_alias
     add_currency_code_alias
     add_script_code_alias
    
    
     delete_country_code_alias
     delete_language_code_alias
     delete_currency_code_alias
     delete_script_code_alias
    
  • New aliases
    Added "UK" alias. Steve Hay

Don't miss a new Locale-Codes release

NewReleases is sending notifications on new releases.