Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.6k views
in Technique[技术] by (71.8m points)

有没有vue-i18n的案例可以参考下?

有没有vue-i18n的案例可以参考下,想了解下vue-i18n实际在进行不同语言切换的使用,比如遇到中英文切换显示的长度相差比较大(中文可能2个字,英文可能10多个字母)的时候会怎么处理?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

关于“中英文显示的长度相差较大”这个问题,我们是代码里判断当前语言是中文还是英文,然后设置不同的宽度(不让换行或省略显示),但是感觉这样不太好。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...