Revision f0dd8310
Added by Marc Dequènes over 14 years ago
- ID f0dd8310c39d6401ca1948ec501672eee860b725
lib/mycyma.rb | ||
---|---|---|
|
||
def switch_locale(locale = nil)
|
||
# if unspecified, use browser prefered langage
|
||
if locale.nil?
|
||
cgi = nil
|
||
if defined? request.cgi
|
||
cgi = request.cgi
|
||
end
|
||
set_cgi(cgi)
|
||
else
|
||
set_locale(locale)
|
||
end
|
||
# (the new locale_rails handle this automagically by default)
|
||
set_locale(locale) unless locale.nil?
|
||
end
|
||
end
|
||
end
|
Also available in: Unified diff
[fix] rails migration: correct locale setting