Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Uni Localization example for Vue.js 2.x

License

NotificationsYou must be signed in to change notification settings

uiwebkit/localize-vue-2x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Check out demohere

Check out our docshere

Add to main.js

Vue.config.ignoredElements=[/uni-\w*/];

Add to index.html

<scripttype="module"src="https://cdn.jsdelivr.net/npm/@uiwebkit/flag@0.1.1/dist/flag/flag.esm.js"></script><scripttype="module"src="https://cdn.jsdelivr.net/npm/@uiwebkit/udk@2.0.0-13/dist/udk.esm.js"></script><scripttype="module"src="https://cdn.jsdelivr.net/npm/@uiwebkit/mat@2.0.0-2/dist/mat.esm.js"></script><scripttype="module"src="https://cdn.jsdelivr.net/npm/@uiwebkit/loc@2.0.0-6/dist/loc/loc.esm.js"></script>

Place Uni Language Menu into the header of your web app. Specify the path to the language list JSON file (ex. lang-menu.json) or backend API endpoint

<uni-routershadow></uni-router><uni-lang-menu-shadowminiroundroutingurl="lang-menu.json"></uni-lang-menu-shadow>

Wrap your content with Uni Translate globally (for more convenience)

<uni-translate><ContentComponent/></uni-translate>

or wrap your text content with Uni Translate locally (for better performance)

<uni-translate>localized content</uni-translate>

localize partially

<uni-translate>text and (( partially localized ))</uni-translate>

localize attributes

<uni-translate><ahref="https://your_domain/(( localized ))">link</a></uni-translate>

open and modify ./public/lang-menu.json and translation files into ./public/i18n/ folder


[8]ページ先頭

©2009-2025 Movatter.jp