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

Support Chinese #14

Closed
ztj666 opened this issue Nov 23, 2018 · 6 comments
Closed

Support Chinese #14

ztj666 opened this issue Nov 23, 2018 · 6 comments
Labels
question Further information is requested

Comments

@ztj666
Copy link

ztj666 commented Nov 23, 2018

No description provided.

@jifalops jifalops changed the title 怎么设置中文 Support Chinese Nov 24, 2018
@jifalops
Copy link
Owner

Can you be more specific? I'm not sure what I can do to support Chinese exactly. This widget just combines two platform features together and doesn't introduce anything fundamentally new.

@jifalops jifalops added the question Further information is requested label Nov 25, 2018
@ztj666
Copy link
Author

ztj666 commented Nov 26, 2018

就是怎么设置控件显示中文 现在展示出来默认都是英文

@jifalops
Copy link
Owner

Is how to set the control to display Chinese. Now the default is English.

The date picker dialog uses https://docs.flutter.io/flutter/material/showDatePicker.html from the platform. I don't see any option for language.

If you mean for the text to be in Chinese, I believe that would be a device setting.

Here's a couple of resources that might help.
https://github.com/flutter/flutter/wiki/Using-Flutter-in-China
https://stackoverflow.com/questions/50978624/device-language-changes-in-flutter

@qingxo
Copy link

qingxo commented Jan 17, 2019

@jifalops I think the question is, they want to change the "cancel" and "ok" button text when the clock is show on the screen.

@Wujerry
Copy link
Contributor

Wujerry commented Mar 10, 2019

@ztj666
step1:
follow this: https://flutter.dev/docs/development/accessibility-and-localization/internationalization

step2:
add locale: Locale('zh');

example:

DateTimePickerFormField(
                  inputType: InputType.both,
                  format: DateFormat('yyyy-MM-dd hh:mm'),
                  editable: false,
                  locale: Locale('zh'),           
                ),

@jifalops
Copy link
Owner

Please see the example at https://pub.dev/packages/datetime_picker_formfield#-example-tab-. The last widget at the bottom of the page shows the date/time pickers in Chinese.

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

No branches or pull requests

4 participants