Ignore:
Timestamp:
Oct 23, 2009, 7:30:37 PM (11 years ago)
Author:
ronosman
Message:

Test if the locale is available before trying to create it. Chinese or japanese are not available by default on XP.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/pLoader/trunk/src/Uploader/GUI/wxApp.pm

    r4096 r4098  
    145145      ]
    146146    );
     147    # some languages may be unavailable due to system configuration.
    147148    $self->_filter_available_languages;
    148 
    149149    Wx::InitAllImageHandlers();
    150150    my $applicationName = "pLoader" ;
     
    232232            grep {$_}
    233233            map{
    234                 my $locale = Wx::Locale->new($_->[1]);
    235                 $locale->AddCatalogLookupPathPrefix('../locale');
    236                 $_ if $locale->AddCatalog('pLoader');
     234                            #  a locale may be unavailable due to system limitations ( ex: chinese, japanese when language pack are not installed )
     235                            if(Wx::Locale::IsAvailable($_->[1])){
     236                            my $locale = Wx::Locale->new($_->[1]);
     237                            $locale->AddCatalogLookupPathPrefix('../locale');
     238                            $_ if $locale->AddCatalog('pLoader');
     239                                }
    237240            }
    238241            @{$self->languages}
Note: See TracChangeset for help on using the changeset viewer.