Revision f0dd8310
Added by Marc Dequènes about 12 years ago
- ID f0dd8310c39d6401ca1948ec501672eee860b725
lib/mycyma.rb | ||
---|---|---|
37 | 37 |
|
38 | 38 |
def switch_locale(locale = nil) |
39 | 39 |
# if unspecified, use browser prefered langage |
40 |
if locale.nil? |
|
41 |
cgi = nil |
|
42 |
if defined? request.cgi |
|
43 |
cgi = request.cgi |
|
44 |
end |
|
45 |
set_cgi(cgi) |
|
46 |
else |
|
47 |
set_locale(locale) |
|
48 |
end |
|
40 |
# (the new locale_rails handle this automagically by default) |
|
41 |
set_locale(locale) unless locale.nil? |
|
49 | 42 |
end |
50 | 43 |
end |
51 | 44 |
end |
Also available in: Unified diff
[fix] rails migration: correct locale setting