Localization in Flutter PDF Viewer (SfPdfViewer)

18 Aug 20211 minute to read

By default, the SfPdfViewer widget supports US English localization. You can change the other languages by specifying the MaterialApp properties and adding the flutter_localizations and syncfusion_localizations package to your application.

To use flutter_localizations and syncfusion_localizations, add the packages as a dependency to the pubspec.yaml file.

  • dart
  • dependencies:
      sdk: flutter
    syncfusion_localizations: ^XX.X.XX

    Next, import the flutter_localizations and syncfusion_localizations library and specify the localizationsDelegates and supportedLocales for MaterialApp to localize the contents in the SfPdfViewer (page navigation dialog and bookmark view).

    import 'package:flutter_localizations/flutter_localizations.dart';
    import 'package:syncfusion_localizations/syncfusion_localizations.dart';
    Widget build(BuildContext context) {
      return MaterialApp(
        localizationsDelegates: [
        supportedLocales: [
          const Locale('fr'),
          const Locale('ru'),
          const Locale('ta'),
        locale: const Locale('fr'),
        title: 'PDF Viewer Localization',
        home: Scaffold(
          appBar: AppBar(
            title: Text('Syncfusion Flutter PDF Viewer'),
          body: SfPdfViewer.network(