-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3.x] Localization of phone field with country select not possible #2042
Comments
My only issue with using the intl-tel-input internationalisation is that languages are tree-shaken, and that in order to make the given language dynamic, we would need to load in every language translation into the front-end JS for Formie so that they can be switched to after build time. This makes the I'll have to have a look at some more advanced options, possibly creating our own translations somehow. |
It would be great anyway, to be able to overwrite those translations. Especially the interface texts... |
If anything, it'll probably be the goal to use Craft's/Formie's static translations which are probably already ready for things like country names. It'll just be figuring out how to supply those to a JS component we don't have control over! |
In the end, the translations are just JS objects: https://github.com/jackocnr/intl-tel-input/blob/master/src/js/intl-tel-input/i18n/de/interface.ts |
Yep, aware of that. We'll have to construct our own for a specific language (the one you configure the field to use), rather than bundle them all at the JS build step. |
Describe the bug
We would like to use the phone input and allow the country selection as offered. Our website is in German and English and we create a form per language.
I think the localization of that field is missing at the moment. All texts are in English and not changable.
Docs:
https://intl-tel-input.com/examples/localise-countries.html
Steps to reproduce
Form settings
Craft CMS version
5.3.x
Plugin version
3.x
Multi-site?
"Yes"
Additional context
No response
The text was updated successfully, but these errors were encountered: