Two weeks after the last TextEllipsis, it’s finally time for another big change. Yes, I finally finished writing the internationalization of HeyUI, and incidentally translated the whole website.
Anyway, it took the better part of a month. ๐๐, silently looking back on my Dragon Boat holiday…..
๐ English website
First of all, we already have an English version of the system. Poke me to see
๐จ ๐ณ HeyUI internationalization
HeyUI is in Chinese by default. If you need to use another language, or if you need to change some of the expressions, you can also refer to the following configuration.
๐ผ Set the system language
import Vue from 'vue';
import HeyUI from 'heyui';
import en from 'heyui/dist/locale/en-US';
Vue.use(HeyUI);
HeyUI.locale(en);
Copy the code
๐ use vue – i18n
import Vue from 'vue';
import HeyUI from 'heyui';
import VueI18n from 'vue-i18n';
import en from 'heyui/dist/locale/en-US';
import zh from 'heyui/dist/locale/zh-CN';
Vue.use(HeyUI);
Vue.use(VueI18n);
const messages = {
en: Object.assign({ message: 'hello' }, en),
zh: Object.assign({ message: 'hello' }, zh)
};
const i18n = new VueI18n({
locale: 'zh'.// set locale
fallbackLocale: 'en',
messages // set locale messages
});
// init i18n with heyui
HeyUI.i18n(i18n);
// change language
// vue file
this.$i18n.locale = 'en';
// or
i18n.locale = 'en';
Copy the code
โ finally
In fact, I translated the whole website by myself (using tools). If you feel that the translation is not good, you are very welcome to issue.
We hope that more and more people will support our project:
We look forward to your visit to Star โจโจ
โ next
HeyUI component library, so far, the overall function is very stable. The next step is to supplement the system’s test cases. It is desirable to have a comprehensive test case to support the stability of the system for future development and maintenance. Come on!