Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ones-design/locale

Package Overview
Dependencies
Maintainers
4
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ones-design/locale

ONES Design

  • 1.16.3-canary.8
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

import { Meta } from '@storybook/blocks'

Locale 国际化

ONES Design 目前的默认文案是简体中文,如果需要使用其他语言,可以参考下面的方案

ConfigProvider

ONES Design 提供了 ConfigProvider 组件用于全局配置国际化文案

import { ConfigProvider } from '@ones-design/core'
import { zhCN } from '@ones-design/locale'

ReactDOM.render(
  <ConfigProvider locale={zhCN}>
    <App />
  </ConfigProvider>,
  root,
)

详细配置见:ConfigProvider 组件

目前支持以下语言:

语言名称
英语(美式)enUS
日语jaJP
简体中文zhCN

Keywords

FAQs

Package last updated on 22 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc