Closed SShayashi closed 2 months ago
@SShayashi I was able to see the localized text for those options in the toolbar as below:
I verified on latest master and stable by running the code sample on iOS simulator, changed language to Japanese.
Also, see this fix for your reference: https://github.com/flutter/flutter/pull/144857
@darshankawar Thanks for the reply, I tried it with 3.19.2 and confirmed that it localizes correctly.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
Summary
Some of the toolbar buttons that appear when selecting text are not localized. The first four buttons (
Cut
,Copy
,Paste
andLook Up
) are localized and displayed in Japanese, but theSearch Web
and `Share... buttons are not localized.sample
```dart import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( localizationsDelegates: const [ GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate, GlobalCupertinoLocalizations.delegate, ], supportedLocales: const [ Locale('en', ''), // English, no country code Locale('ja', ''), // Japanese, no country code // 他のロケールを追加する ], home: Scaffold( appBar: AppBar( title: const Text('Sample App'), ), body: const Center( child: MyCustomForm(), ), ), ); } } class MyCustomForm extends StatefulWidget { const MyCustomForm({super.key}); @override MyCustomFormState createState() { return MyCustomFormState(); } } class MyCustomFormState extends Statepubspec.yaml
```yaml name: try_localizations description: "A new Flutter project." publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: sdk: '>=3.2.0 <4.0.0' dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter cupertino_icons: ^1.0.2 dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^2.0.0 flutter: uses-material-design: true ```flutter doctor -v
``` ➜ try_roboto_font git:(main) flutter doctor -v [✓] Flutter (Channel stable, 3.16.0, on macOS 13.4 22F66 darwin-arm64, locale ja-JP) • Flutter version 3.16.0 on channel stable at /Users/01036096/fvm/versions/3.16.0 • Upstream repository https://github.com/flutter/flutter.git • Framework revision db7ef5bf9f (4 months ago), 2023-11-15 11:25:44 -0800 • Engine revision 74d16627b9 • Dart version 3.2.0 • DevTools version 2.28.2 [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2) • Android SDK at /Users/01036096/Library/Android/sdk • Platform android-33, build-tools 33.0.2 • ANDROID_HOME = /Users/01036096/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 14.1) • Xcode at /Applications/Xcode14.1.app/Contents/Developer • Build 14B47b • CocoaPods version 1.12.1 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2022.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) [✓] VS Code (version 1.86.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.84.0 [✓] Connected device (3 available) • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 12 (API 31) (emulator) • macOS (desktop) • macos • darwin-arm64 • macOS 13.4 22F66 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 122.0.6261.112 [✓] Network resources • All expected network resources are available. • No issues found! ```