如何在react-intl中使用数组字符串?

时间:2019-01-21 09:23:09

标签: javascript reactjs internationalization translation react-intl

是否有任何显示数组字符串转换的选项?

"app.components.TeaserContent.kooy":["your personal selection.", "outfits styled for you.", "new favourite items.", "your new wardrobe."]

对于

import { defineMessages } from 'react-intl'
export default defineMessages({
  typeText: {
    id: 'app.components.TeaserContent.kooy',
    default: 'dfgdfgdf'
  },

console.log(intl.formatMessage({ ...messages.typeText }))

并在控制台中出现与问题

相同的错误

screenshot 2019-01-18 at 2 48 43 pm

0 个答案:

没有答案