Skip to content

Commit

Permalink
feat: auto change language
Browse files Browse the repository at this point in the history
  • Loading branch information
Joehaivo committed Jan 19, 2023
1 parent 2980d59 commit 1d42a83
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
## 1. Feature

- Supported browse icons through drag and drop TTF file into the application window, also supported batch drag and drop. (Except mobile phone)
- Supported to open multiple font files at the same time.
- Supported to search icon by icon name (glyphName).
- Supported copy all glyph code (JSON format) to clipborad, convenient to your programming.
- Supported change icon color.
- Supported multi-platform:
- Support browse icons through drag and drop TTF file into the application window, also supported batch drag and drop. (Except mobile phone)
- Support to open multiple font files at the same time.
- Support to search icon by icon name (glyphName).
- Support copy all glyph code (JSON format) to clipborad, convenient to your programming.
- Support change icon color.
- Support automatic follow-up system language.(English and Chinese)
- Support multi-platform:

| Android | iOS | WEB | MacOS | Windows | Linux |
| :-----: | :--: | :-------------------------------------------: | :---: | :-----: | :---: |
Expand Down
1 change: 1 addition & 0 deletions README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- 支持通过图标关键字来搜索过滤
- 支持复制字体内所有的字形代码(JSON), 方便编程
- 支持改变图标颜色
- 支持自动跟随系统切换语言(中文和英文)
- 支持多平台

| Android | iOS | WEB | MacOS | Windows | Linux |
Expand Down
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return GetMaterialApp(
translations: I18nValue(),
locale: const Locale('zh', 'CN'),
locale: Get.deviceLocale?.languageCode == 'zh' ? const Locale('zh', 'CN') : const Locale('en', 'US'),
fallbackLocale: const Locale('en', 'US'),
title: "TTF Viewer",
theme: ThemeData(
Expand Down

0 comments on commit 1d42a83

Please sign in to comment.