Make WordPress Core

Changeset 11290


Ignore:
Timestamp:
05/12/2009 01:04:16 AM (15 years ago)
Author:
ryan
Message:

Translate continent and city names for timezone picker. see #9794

Location:
trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r11288 r11290  
    31343134        if ( empty($selectcontinent) && !empty($city) ) {
    31353135            $selectcontinent = $continent;
    3136             $structure .= '<optgroup label="'.$continent.'">' . "\n"; // continent
     3136            $structure .= '<optgroup label="'. esc_attr( translate( $continent ) ) .'">' . "\n"; // continent
    31373137        } elseif ( !empty($selectcontinent) && $selectcontinent != $continent ) {
    31383138            $structure .= "</optgroup>\n";
     
    31403140            if ( !empty($city) ) {
    31413141                $selectcontinent = $continent;
    3142                 $structure .= '<optgroup label="'.$continent.'">' . "\n"; // continent
     3142                $structure .= '<optgroup label="'. esc_attr( translate( $continent ) ) .'">' . "\n"; // continent
    31433143            }
    31443144        }
     
    31493149            }
    31503150            $display = str_replace('_',' ',$city);
     3151            $display = translate($display);
    31513152            if ( $continent == 'Etc' )
    31523153                $display = strtr($display, '+-', '-+');
    31533154            $structure .= "\t<option ".((($continent.'/'.$city)==$selectedzone)?'selected="selected"':'')." value=\"".($continent.'/'.$city)."\">$pad".$display."</option>\n"; //Timezone
    31543155        } else {
    3155             $structure .= "<option ".(($continent==$selectedzone)?'selected="selected"':'')." value=\"".$continent."\">".$continent."</option>\n"; //Timezone
     3156            $structure .= "<option ".(($continent==$selectedzone)?'selected="selected"':'')." value=\"".$continent."\">" . translate($continent) . "</option>\n"; //Timezone
    31563157        }
    31573158    }
Note: See TracChangeset for help on using the changeset viewer.