mirror of
https://github.com/oxen-io/oxen-electron-gui-wallet.git
synced 2023-12-14 06:13:02 +01:00
Updated readme.
This commit is contained in:
parent
8a3e8044d3
commit
10e6e4c5e3
|
@ -29,3 +29,12 @@ cp path_to_loki_binaries/loki-wallet-rpc bin/
|
||||||
npm install
|
npm install
|
||||||
quasar build -m electron -t mat
|
quasar build -m electron -t mat
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Adding language support
|
||||||
|
|
||||||
|
Adding a new language is fairly simple.
|
||||||
|
|
||||||
|
1. Duplicate the language file `src/i18n/en-us.js` and rename it to the relevant language code.
|
||||||
|
2. Translate all the strings in that duplicated file. Take note that capitalization matters.
|
||||||
|
3. Add the language to the `languages` array in `src/i18n/index.js`. The `flag` property is the [ISO 3166-1-alpha-2 code](https://www.iso.org/obp/ui/#search/code/) of a country.
|
||||||
|
4. Submit a PR with your changes.
|
||||||
|
|
|
@ -18,18 +18,20 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { languages } from "src/i18n"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "LanguageSelect",
|
name: "LanguageSelect",
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
options: [
|
|
||||||
{ label: "English", value: "en-us", flag: "us" },
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
lang () {
|
lang () {
|
||||||
return this.$i18n.locale
|
return this.$i18n.locale
|
||||||
|
},
|
||||||
|
options () {
|
||||||
|
return languages.map(lang => ({
|
||||||
|
label: lang.name,
|
||||||
|
value: lang.code,
|
||||||
|
flag: lang.flag
|
||||||
|
}))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
// LOKI: DO NOT MODIFY THIS FILE
|
|
||||||
// LANGUAGE FILES CAN BE DYNAMICALLY LOADED
|
|
||||||
import enUS from "./en-us"
|
import enUS from "./en-us"
|
||||||
|
|
||||||
|
// ADD LANGUAGES HERE
|
||||||
|
const languages = [
|
||||||
|
{ name: "English", code: "en-us", flag: "us" }
|
||||||
|
]
|
||||||
|
|
||||||
|
export { languages }
|
||||||
|
|
||||||
|
// DO NOT MODIFY THIS EXPORT, LANGUAGE FILES CAN BE DYNAMICALLY LOADED
|
||||||
export default {
|
export default {
|
||||||
"en-us": enUS
|
"en-us": enUS
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue