Commit 7b00579f authored by o@immerda.ch's avatar o@immerda.ch
Browse files

estract lang prefix

parent 34e900f2
......@@ -8,6 +8,7 @@ class ApplicationController < ActionController::Base
before_action :set_locale
def valid_l(l)
l = l.to_s[0..1]
return l if l && I18n.available_locales.include?(l.to_sym)
nil
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment