public
Description: Translate text between two languages using www.tranexp.com
Homepage: http://tranexp.rubyforge.org
Clone URL: git://github.com/drnic/tranexp.git
updated codes.rb with all the supported languages
drnic (author)
Tue Apr 15 17:32:39 -0700 2008
commit  629155cd5d19b2437975d2a5b15b736a675ec360
tree    d2bd82f739594ddda25fe833b8e91a7d49289e45
parent  b566aa5c0d48cb5d7c3ba11becadd59c8195c16d
...
34
35
36
37
38
39
40
41
42
43
44
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
47
48
...
34
35
36
 
 
 
 
 
 
 
 
 
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
0
@@ -34,15 +34,35 @@ Or use the dynamic helper:
0
 == SYNOPSIS
0
 
0
 * Translates between the following languages:
0
- "BrazilianPortuguese" => "pob",
0
- "Bulgarian" => "bul",
0
- "Croatian" => "cro",
0
- "Czech" => "che",
0
- "Danish" => "dan",
0
- "English" => "eng",
0
- "Norwegian" => "nor"
0
-
0
-(there are more, I just haven't added their codes yet... DIY - lib/tranexp/codes.rb)
0
+ "English" => "eng",
0
+ "BrazilianPortuguese" => "pob",
0
+ "Bulgarian" => "bul",
0
+ "Croatian" => "cro",
0
+ "Czech" => "che",
0
+ "Danish" => "dan",
0
+ "Dutch" => "dut",
0
+ "Spanish" => "spa",
0
+ "Finnish" => "fin",
0
+ "French" => "fre",
0
+ "German" => "ger",
0
+ "Greek" => "grk",
0
+ "Hungarian" => "hun",
0
+ "Icelandic" => "ice",
0
+ "Italian" => "ita",
0
+ "Japanese" => "jpn",
0
+ "Latin American Spanish" => "spl",
0
+ "Norwegian" => "nor",
0
+ "Filipino" => "tag",
0
+ "Polish" => "pol",
0
+ "Portuguese" => "poe",
0
+ "Romanian" => "rom",
0
+ "Russian" => "rus",
0
+ "Serbian" => "sel",
0
+ "Slovenian" => "slo",
0
+ "Swedish" => "swe",
0
+ "Welsh" => "wel",
0
+ "Turkish" => "tur",
0
+ "Latin" => "ltt"
0
 
0
 Future versions might support the 2 character abbreviations for languages; currently
0
 it just supports the 3 character codes used within tranexp.
...
1
2
3
 
 
4
5
6
7
8
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
11
 
12
13
14
15
...
1
2
 
3
4
5
6
7
8
 
 
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 
33
34
 
 
 
0
@@ -1,15 +1,34 @@
0
 module Tranexp::Codes
0
   @@codes = {
0
- "BrazilianPortuguese" => "pob",
0
+ "English" => "eng",
0
+ "Brazilian Portuguese" => "pob",
0
     "Bulgarian" => "bul",
0
     "Croatian" => "cro",
0
     "Czech" => "che",
0
     "Danish" => "dan",
0
- "English" => "eng",
0
- "Norwegian" => "nor"
0
+ "Dutch" => "dut",
0
+ "Spanish" => "spa",
0
+ "Finnish" => "fin",
0
+ "French" => "fre",
0
+ "German" => "ger",
0
+ "Greek" => "grk",
0
+ "Hungarian" => "hun",
0
+ "Icelandic" => "ice",
0
+ "Italian" => "ita",
0
+ "Japanese" => "jpn",
0
+ "Latin American Spanish" => "spl",
0
+ "Norwegian" => "nor",
0
+ "Filipino" => "tag",
0
+ "Polish" => "pol",
0
+ "Portuguese" => "poe",
0
+ "Romanian" => "rom",
0
+ "Russian" => "rus",
0
+ "Serbian" => "sel",
0
+ "Slovenian" => "slo",
0
+ "Swedish" => "swe",
0
+ "Welsh" => "wel",
0
+ "Turkish" => "tur",
0
+ "Latin" => "ltt"
0
   }
0
- @@codes.each_pair { |name, code| self.const_set(name, code) }
0
+ @@codes.each_pair { |name, code| self.const_set(name.gsub(/\s+/, ''), code) }
0
 end
0
-
0
-# remaining codes
0
-# <option value="dut">Dutch</option><option value="spa">Spanish</option><option value="fin">Finnish</option><option value="fre">French</option><option value="ger">German</option><option value="grk">Greek</option><option value="hun">Hungarian (CP 1250)</option><option value="ice">Icelandic</option><option value="ita">Italian</option><option value="jpn">Japanese (Shift JIS)</option><option value="spl">Latin American Spanish</option><option value="nor">Norwegian</option><option value="tag">Filipino (Tagalog)</option><option value="pol">Polish (ISO 8859-2)</option><option value="poe">Portuguese</option><option value="rom">Romanian (CP 1250)</option><option value="rus">Russian (CP 1251)</option><option value="sel">Serbian (CP 1250)</option><option value="slo">Slovenian (CP 1250)</option><option value="swe">Swedish</option><option value="wel">Welsh</option><option value="tur">Turkish (CP 1254)</option><option value="ltt">Latin</option>

Comments

    No one has commented yet.