How can you allow users (companies) in your app to select their own currency?
We use i18n and we have our app in ~5 languages, but we want the companies to be able to select which currency to use.
Mainly to choose the correct symbol to show on their invoices to their customers.
This is not an e-commerce site, so no currency conversion is needed, only displaying of currency.
Requirements:
- In company settings, there would be box with all the available currencies from i18n or similar A company in Netherlands can have the app in English but choose the Euro currency. A company in Argentina can have the app in Spanish but use the Argentine peso (and not the Euro) We have done extensive research and found no clear answer to this. Maybe the answer is too obvious and we missed it? Related unanswered questions: https://stackoverflow.com/questions/16285677/multiple-currencies-in-rails https://stackoverflow.com/questions/36700004/ruby-on-rails-currency-switcher-for-whole-site https://stackoverflow.com/questions/58357673/how-to-allow-users-to-select-all-currencies-but-with-limited-languages https://www.reddit.com/r/rails/comments/gepybq/how_do_you_allow_users_to_select_between_multiple/ https://github.com/svenfuchs/rails-i18n/issues/874
You could add a currency
field to your Company
model, and allow it do be modified through the CompaniesController#edit
action. This way I can have my locale as Spanish, but select any currency that I want and see that across the application.