Changeset 11076


Ignore:
Timestamp:
03/11/10 12:44:46 (2 years ago)
Author:
szabgab
Message:

decode utf8 string for display

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre/lib/Padre/Locale.pm

    r11075 r11076  
    6060my %RFC4646; 
    6161 
    62 # taken from gettext translations of the iso-codes package 
     62# The utf8text could/should be taken from gettext translations of the iso-codes package 
    6363# file:///usr/share/locale/*/LC_MESSAGES/iso_639.mo 
    6464# file:///usr/share/xml/iso-codes/iso_639.xml 
    6565# http://pkg-isocodes.alioth.debian.org/ 
    66 #my %lang_labels = ( 
    67 #   'de'    => 'Deutsch', 
    68 #); 
    6966 
    7067sub label { 
    7168    my $name = shift; 
    72     return $RFC4646{$name}{utf8text} || $name 
     69    require Encode; 
     70    return $RFC4646{$name}{utf8text} ? Encode::decode('utf8', $RFC4646{$name}{utf8text}) : $name 
    7371} 
    7472 
Note: See TracChangeset for help on using the changeset viewer.