Index: trunk/extensions/Babel/names.cdb |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Index: trunk/extensions/Babel/txt2cdb.php |
— | — | @@ -16,9 +16,11 @@ |
17 | 17 | |
18 | 18 | $fr = fopen( dirname( __FILE__ ) . '/codes.txt', 'r' ); |
19 | 19 | while ( $line = fgets( $fr ) ) { |
20 | | - $line = explode( ' ', $line ); |
| 20 | + // Format is code1 code2 "language name" |
| 21 | + $line = explode( ' ', $line, 3 ); |
21 | 22 | $iso1 = trim( $line[0] ); |
22 | 23 | $iso3 = trim( $line[1] ); |
| 24 | + // Strip quotes |
23 | 25 | $name = substr( trim( $line[2] ), 1, -1 ); |
24 | 26 | if ( $iso1 !== '-' ) { |
25 | 27 | $codes->set( $iso1, $iso1 ); |