element-ui-international
TypeScript icon, indicating that this package has built-in type declarations

2.16.32 • Public • Published

阿拉伯文显示解决方案

阿拉伯语是个神奇的语言,有看到过阿拉伯语言阅读和写作习惯是从右到左,为了方便不同客户,提供elementUI镜像翻转效果,基于element UI框架,在保证原有组件原始特性为前提, 针对阿拉伯语言特殊阅读方式进行修改,适配阿拉伯语言网站使用。

Element will stay with Vue 2.x

Install

npm install element-ui-international -S

Quick Start

// main.js
import Vue from 'vue'
import Element from 'element-ui-international'
Vue.use(ElementUI, { size: 'small' });
// or
import {
  Select,
  Button
  // ...
} from 'element-ui-international'

Vue.component(Select.name, Select)
Vue.component(Button.name, Button)

Use RTL

import VueI18n from 'vue-i18n';
// 引入修改语言方法Locale
import Locale from 'element-ui-international/lib/locale';

Vue.use(VueI18n);
const i18n = new VueI18n({
// 合并项目中的语言包
  messages: {
    ...require('@/lang/zh-cn'), //项目中的语言包
    ...require('@/lang/en'),
    ...require('@/lang/ar')
  }
});
// 动态获取elementUI的语言包, uiLang 为 :'ar', 'en' 或 ’zh-CN‘等, 
const newLang = require('element-ui-international/lib/locale/lang/' + uiLang).default;
// 设置uiLang = 'ar' 将切换为RTL布局
Locale.use(newLang, 'ar')
// 配合vueI18n 设置语言
i18n.local = uiLang

For more information, please refer to Quick Start in our documentation.

Browser Support

Modern browsers and Internet Explorer 10+.

Readme

Keywords

Package Sidebar

Install

npm i element-ui-international

Weekly Downloads

54

Version

2.16.32

License

MIT

Unpacked Size

8.27 MB

Total Files

929

Last publish

Collaborators

  • dragoninfo