Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否考虑支持下国际化 #3

Open
JosephMing opened this issue Mar 6, 2023 · 15 comments
Open

能否考虑支持下国际化 #3

JosephMing opened this issue Mar 6, 2023 · 15 comments

Comments

@JosephMing
Copy link

能否实现国际化

@xiangshu233
Copy link
Owner

这个 比较麻烦哈哈,不过 vant 支持 国际化
https://vant-ui.github.io/vant/#/zh-CN/locale
至于业务代码可以借助 Vue I18n
https://vue-i18n.intlify.dev/

等我周末研究研究

@smartdapan
Copy link

同求大佬能支持多语言国际化

@ChenXj6
Copy link

ChenXj6 commented Mar 25, 2024

国际化的话,我添加到了这个框架中。但是我没有上传,明天的话我可以尝试搞一下

@xiangshu233
Copy link
Owner

@ChenXj6 欢迎 pr 提交规范

@smartdapan
Copy link

这个 比较麻烦哈哈,不过 vant 支持 国际化 https://vant-ui.github.io/vant/#/zh-CN/locale 至于业务代码可以借助 Vue I18n https://vue-i18n.intlify.dev/

等我周末研究研究

大佬,求跟进

@ChenXj6
Copy link

ChenXj6 commented Mar 26, 2024

@ChenXj6 欢迎 pr 提交规范

代码提交好了

@xiangshu233
Copy link
Owner

@ChenXj6 feature 分支合并本地测试全是报错😂
image

@ChenXj6
Copy link

ChenXj6 commented Mar 27, 2024

image
image

可能是我把页面路由以及显示的文本都换成中文的原因

@xiangshu233
Copy link
Owner

@ChenXj6 它提示找不到 i18n-t 这个组件

<template>
  <i18n-t tag="span" :keypath="getTitle" scope="global" />
</template>

这个组件不需要引入吗

const props = defineProps({
  title: {
    type: [String, Object] as PropType<string | Title18n | any>,
    required: true,
    default: '',
  },
})

Title18n 这个类型在我本地也显示找不到

@ChenXj6
Copy link

ChenXj6 commented Mar 27, 2024

@ChenXj6 它提示找不到 i18n-t 这个组件

<template>
  <i18n-t tag="span" :keypath="getTitle" scope="global" />
</template>

这个组件不需要引入吗

const props = defineProps({
  title: {
    type: [String, Object] as PropType<string | Title18n | any>,
    required: true,
    default: '',
  },
})

Title18n 这个类型在我本地也显示找不到

   //  /types/global.d.ts  declare global声明下
  type Title18n = {
    [p in LocaleType]: string;
  }

昨天忘记一起更新进去了

@xiangshu233
Copy link
Owner

@ChenXj6 这个组件哪里来的?

<template>
  <i18n-t tag="span" :keypath="getTitle" scope="global" />
</template>

@ChenXj6
Copy link

ChenXj6 commented Mar 27, 2024 via email

@xiangshu233
Copy link
Owner

@ChenXj6 大致上好了还有一些小问题,周末找个时间改改

@ChenXj6
Copy link

ChenXj6 commented Mar 27, 2024 via email

@smartdapan
Copy link

大佬们牛逼,这效率杠杠的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants