Skip to content

Instantly share code, notes, and snippets.

@borie88
Last active March 10, 2019 15:09
Show Gist options
  • Save borie88/48f2849de27197e8d890c1655f050260 to your computer and use it in GitHub Desktop.
Save borie88/48f2849de27197e8d890c1655f050260 to your computer and use it in GitHub Desktop.
Store.js for i18n Mini Program
import languageStrings from './i18n/strings'
export default {
data: {
language: 'en',
strings: languageStrings
},
getLanguage () {
return this.data.language
},
showLoading () {
wx.showLoading({
title: this.data.strings[this.data.language].loadingTitle,
mask: true
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment