I was testing out the code yesterday an I could not get it to work. I just realized I had a bunch of exports missing.
These exports allowed me just to override the interface translation without touching the countries.
This is part of my code
import { enInterfaceTranslations, elInterfaceTranslations } from "intl-tel-input/build/js/i18n/index.mjs";
...
let translations = {};
switch (i18n.locale) {
case "en":
translations = enInterfaceTranslations;
break;
case "el":
translations = elInterfaceTranslations;
break;
default:
console.error(`${i18n.locale} is not supported in our implementation of intl_tel_input yet.`);
translations = enInterfaceTranslations;
break;
}
...
i18n: translations,
Idealy I would like to do this
import { enInterfaceTranslations, elInterfaceTranslations } from "intl-tel-input/i18n";
instead of
import { enInterfaceTranslations, elInterfaceTranslations } from "intl-tel-input/build/js/i18n/index.mjs";
The important files to look at are
I was testing out the code yesterday an I could not get it to work. I just realized I had a bunch of exports missing. These exports allowed me just to override the interface translation without touching the countries.
This is part of my code
Idealy I would like to do this
instead of
Thanks 😄