Internationalization of the Verto Wallet from Volentix using vue-i18n
- Internationalization of the whole project using vue-i18n
- Extraction of all strings and replaced by variables.
- Complete French translation
What is Vue-i18n
Vue I18n is internationalization plugin for Vue.js
- Easy: You can introduce internationalization into your app with simple API
- Powerful: In addition to simple translation, support localization such as pluralization, number, datetime ... etc
- Component-oriented: You can manage locale messages on single file component
What is Verto
Verto is a multi-currency wallet that will allow access to the Vdex. Private keys are maintained in this wallet and are accessible only by its owner. Verto will also have integrative functionality of other DApps like orderbook settlement from VDEX and a crypto ratings and rankings dashboard from Vespucci.
When a trade is made on Vdex, the funds are temporarily locked until either the transaction is completed and the new funds become available, or the transaction is cancelled and funds are again available.
How to Internationalize
The first step is to install Vue-i18n and that can be done like so:
npm i --save vue-i18n and from that you should see some changes in your
Now we can import our plugin and add it to the Vue object:
From our plugin file we chose english as our locale, but it would be nice to just be able to change that on the fly. In modifying
src/renderer/components/Settings/SettingsView.vue we are able to do just that with a simple dropdown.
The groundwork now done; we are set for the extraction of the strings and compilation of the strings asset.
I did those two tasks in parallel. Moving the string to the
en.json file and replacing it with the new variable I just made. In this case
Finally I translated the entire
fr.json, here is a sample:
The wallet runs as an electron app, here is the settings view in French:
How to contribute
Simple! 1. fork, 2. modify, 3. submit a pull request to the official repository.