-
Notifications
You must be signed in to change notification settings - Fork 1
Incorrect Japanese Kanji Display on Android with Japanese Locale #65
Copy link
Copy link
Open
Description
When an Android device is set to the Japanese language, some Kanji characters in the S3Drive app are displayed in their Chinese form instead of their Japanese form.
I understand S3Drive uses Flutter. I propose that the app should detect the device's language setting upon startup and adjust the font rendering accordingly.
class MainApp extends StatelessWidget {
const MainApp({super.key});
@override
Widget build(BuildContext context) {
// Retrieve locale of the terminal without countryCode
// to avoid misconfiguration of font in some OPPO terminal
var locale = WidgetsBinding.instance.platformDispatcher.locale;
locale = Locale.fromSubtags(
languageCode: locale.languageCode,
scriptCode: locale.scriptCode,
);
return MaterialApp(
// set locale of the terminal to supportedLocales
supportedLocales: [locale],
home: ...
);
}
}I've tested a solution where the Japanese Kanji displayed correctly on Android terminals set to Japanese.
Conversely, on Android terminals with non-Japanese language settings, Chinese Kanji were displayed, which is the expected behavior.
Full sample code content is available as follows:
https://github.com/edo-bari-ikutsu/flutter-font-eval
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels


