lib/include/class_knjappserver_translations.rb in knjappserver-0.0.16 vs lib/include/class_knjappserver_translations.rb in knjappserver-0.0.17

- old
+ new

@@ -15,13 +15,15 @@ end return trans_val end - def trans_set(obj, values) - args = {} - args[:locale] = _session[:locale] if _session[:locale] and !args[:locale] - args[:locale] = _httpsession.data[:locale] if _httpsession.data[:locale] and !args[:locale] + def trans_set(obj, values, args = {}) + if !args[:locale] + args[:locale] = _session[:locale] if _session[:locale] + args[:locale] = _httpsession.data[:locale] if _httpsession.data[:locale] and !args[:locale] + end + @translations.set(obj, values, args) end def trans_del(obj) @translations.delete(obj) \ No newline at end of file