henninghall / react-native-date-picker

React Native Date Picker is datetime picker for Android and iOS. It includes date, time and datetime picker modes. The datepicker is customizable and is supporting different languages. It's written with native code to achieve the best possible look, feel and performance.
MIT License
2.14k stars 326 forks source link

Add ios's Custom Locale or i18n support #828

Closed PigeonMuyz closed 1 month ago

PigeonMuyz commented 1 month ago

Describe the bug The react-native-date-picker component does not display in Chinese on iOS. The date picker shows English labels instead of Chinese.

Expected behavior The date picker should display labels in Chinese when the device's language is set to Chinese.

To Reproduce Add example code that reproduces the behavior.

export default class App extends Component {

  state = { date: new Date() }

  render = () =>
    <DatePicker
      date={this.state.date}
      onDateChange={date => this.setState({ date })}
      //Like this: Locale={'schinese'|| 'tchinese'|| other}
    />

}

Smartphone (please complete the following information):