hyperswitch
hyperswitch copied to clipboard
[FEATURE] add localisation support for any HTML template served through HyperSwitch
Feature Description
Specifically for payout links
The terminal status pages for payout links are served from backend with basic HTML / JS / CSS templates. The language used in these resources is English which is hardcoded. There needs to be a locale support for handling localisation of payout links.
Possible Implementation
Provisioning of locales
- make use of
rust-i18n
for maintaining locales in the server - make use of
t!
macro for reading the locales at runtime
Consumption in payout links
- Consume locale during payout creation and store the payout link's URL with a hardcoded locale as a query parameter
- Fetch locale during render request and pass to the request handler
- Inject the string data dynamically into HTML / JS resources based on the locale
- Inject locale in SDK for SDK localisation
Have you spent some time checking if this feature request has been raised before?
- [X] I checked and didn't find a similar issue
Have you read the Contributing Guidelines?
- [X] I have read the Contributing Guidelines
Are you willing to submit a PR?
Yes, I am willing to submit a PR!