0

I have a question about localization, I am trying to do multilingual routes, using I18n.

I am using translations in my project, but, I would like to do this

get "/#{I18n.t('routes.kategorie')}" do ...

but, loading crashes on ! Unable to load application: Mustermann::CompileError: capture name can't be empty: "/translation missing: cs.routes.kategorie" bundler: failed to load command: puma (/usr/local/bin/puma) Mustermann::CompileError: capture name can't be empty: "/translation missing: cs.routes.kategorie" but when I start my app (without that route) with pry, I can use this translation

[3] pry(#<Osadababa::App>)> t('routes.kategorie')
=> "kategorie"
[4] pry(#<Osadababa::App>)> I18n.locale = :en
=> :en
[5] pry(#<Osadababa::App>)> t('routes.kategorie')
=> "category"

For both languages. I am working in toplevel app.

Please any suggestions?

Thanks

Mlok
  • 155
  • 9
  • I tried Sinatra way `get "/category", "/kategorie" do` It works, but how to do it in padrino still I cannot handle. I need two names for one controller? – Mlok May 29 '18 at 18:35

1 Answers1

0

I will answer myself, better way is to handle multiple routes, by Padrino or Sinatra style, I am trying to do according the documentation, but still not working

Mlok
  • 155
  • 9