Comments (6)
This is no where close to a PR
But Here it goes. https://github.com/Aadhinana/walletkit/tree/i18n
it takes a new optional prop on WalletKitProvider
itself
langOptions
which takes the different language options that are passed/public/locales/{lang}/translations.json
hold the translated text.
It by default falls back to english, A selector is given as the connect
button is presented.
I really like to to contribute to this. Please help.
This currently uses a hacky approach to update for when the language changes, It uses useTranslation
imported into the files that actually have no use, this is just so the state changes. Need to figure this out.
Working on how to do this properly.
from walletkit.
These are the steps I followed to get this working in local env for dev.
I changed the packages/walletkit/package.json
to keep watching the files.
"build" : "tsc -w"
- Link the package/walletkit using yarn link
- In package/walletkit run yarn build (This will watch the ts files for changes and will also build it)
- In package/example link this walletkit instead of installing it by npm link @gokiprotocol/walletkit
- yarn run to get the example started running!
- DEV
from walletkit.
Thanks @Aadhinana. I'll see how we can include the language selection in the UI-- we should see if we can make it automatically detect the language like Uniswap does.
from walletkit.
i18next-browser-languagedetector
this already does that I guess?
i18n.language
can be used to read it from the browser and set it accordingly. But we might need to include the corresponding files for the translations.
from walletkit.
Great. If there are no locales specified, will the dropdown be displayed? I think we should style that.
Otherwise, I really like the change. Thank you for the code. Please make a pull request!
from walletkit.
Yes if the langOptions
are left empty then by default it shows only english as the sole option.
like this
I thought I'll ask you about the styling. Since it should be consistent with the whole thing.
Okay sure! 👍
Thanks!
PS: I would like to contribute more! Let me know what's next!
from walletkit.
Related Issues (19)
- Use official Solana wallet connector instead of `use-solana` HOT 5
- Readme z-index solution needs different target to work - see workaround
- Needs dark-mode option (or clearer CSS classes for overrides) - see workaround
- Capture all Ledger connection errors
- QUESTION: Did someone manage to get this working with Next.js HOT 4
- Question: is it possible to disable connect to wallet automatically when load the page until click connect button HOT 1
- Detect if wallet resource is used elsewhere
- "Error: Component must be wrapped with <Container.Provider>" in Next.js
- Cannot connect to Phantom mobile HOT 4
- Customize Connect Wallet Button Style HOT 1
- Rename darkenOverlay to resolve React warning HOT 1
- Disconnecting solflare extension wallet breaks the page
- [QUESTION] Does the example given in the repo work? HOT 2
- Feature request: Support Coin98, Mathwallet and Torus wallets HOT 4
- Can you add Slope Wallet to your protocol? HOT 2
- Does it support custom RPC endpoint? HOT 3
- How to sign text message? HOT 1
- Wallet dropdown component
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 walletkit.