Comments (4)
The i18n demo page is in javascript. What issue are you having?
from intl-tel-input.
This is React though not javascript. Ideally wanted a javascript demo if it exists... otherwise I see only way us to do custom e.g. OPTION 2: define your own custom translations
I tried to do this as I could not fine a demo. So Arabic custom. But the Arabic didn't actually display unless you did a space after the "
e.g.
// OPTION 2: define your own custom translations
intlTelInput(input, {
i18n: {
af: " أفغانستان",
Notice the space after the "
If you omit this space it shows English.
from intl-tel-input.
This is React though not javascript
No, it isn't React. What made you think that?
from intl-tel-input.
Sorry my mistake I got confused along the way. I found your demo with import didn't actually work though. I had to do the following below this to get the Russian demo to work. Maybe it was due to running on windows hosting, but I was trying locally firstly on my mac then I uploaded sample to windows hosting and then had to make changes as below to get it working.
<title>International Telephone Input</title>International Telephone Input
Submit<script src="./build/js/intlTelInput.js"></script>
<script type="module">
// Import named exports
import { countryTranslations, interfaceTranslations } from "./build/js/i18n/ru/index.js";
// Import default export
import ruTranslations from "./build/js/i18n/ru/index.js";
const input = document.querySelector("#phone");
// You can use either the named exports or the default export here
window.intlTelInput(input, {
// Using named exports
i18n: { ...countryTranslations, ...interfaceTranslations },
// Using default export
// i18n: ruTranslations,
initialCountry: "ru",
utilsScript: "./build/js/utils.js",
});
</script>
from intl-tel-input.
Related Issues (20)
- Force to use the prefix HOT 5
- Proposal: include translations HOT 3
- ES5 Support on AngularJS App HOT 5
- setNumber not setting the phone Number
- Advise: Multiple instances of intl-tel-input getting loaded, causing global "window" collision HOT 5
- can you exclude the "Unknown" country from the input? HOT 7
- [Question] Is Bower still used? HOT 1
- Console error when using browser autofill HOT 2
- [FUN] intl-tel-input in the wild HOT 4
- [Feature Request] Dark mode on documentation. HOT 4
- Translated country name is passed in few instances HOT 2
- Typescript definitions wrong with 21.2.6 HOT 9
- InitialValue in react component does not set the number and country state values. HOT 2
- Unable to resolve path to module 'intl-tel-input/react' HOT 8
- isValidNumber not working when util.js is pre-loaded (not lazy loaded) in v22.0.2 HOT 6
- Arabic locale HOT 6
- Invalid country data for French overseas territories HOT 2
- Convert flags.png to AVIF format to comply with PageSpeed Insights recommendation HOT 5
- New Country to be added => Artsakh | 374 47, 374 97 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from intl-tel-input.