looking for some solutions? You are welcome.

SOLVED: Rails 5: Is is possible to print out a page with a different language locale?

viktorsmari:

I am printing out a 'receipt' page using the following:

link_to '', :onclick => 'window.print();return false;',

Is it possible to view the page in a locale like en but print it out in a different one like de?

Example: An English speaking user could use the system in Germany, but all the printouts would still be in German. This would allow users to use the system in their own native language, wherever the company or organization is based.

Also, is this this the best way to print out a page in rails?

I tried hacking with the I18n.with_locale() do but did not figure out a nice way to do this. Preferably passing a locale string to the print function or similar.



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
Share:

No comments:

Recent