flappy_translator 2.1.0 copy "flappy_translator: ^2.1.0" to clipboard
flappy_translator: ^2.1.0 copied to clipboard

A tool which automatically generates Flutter localization resources from CSV and Excel files.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

import 'i18n.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      localizationsDelegates: const [
        I18nDelegate(),
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
        GlobalCupertinoLocalizations.delegate,
      ],
      supportedLocales: I18nDelegate.supportedLocals,
      home: const Home(),
    );
  }
}

class Home extends StatelessWidget {
  const Home({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('flappy_translator'),
      ),
      body: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: <Widget>[
            Text(I18n.of(context).plainText),
            Text(I18n.of(context).welcome(name: 'Dash')),
            Text(I18n.of(context).favoriteColor),
          ],
        ),
      ),
    );
  }
}
30
likes
140
pub points
60%
popularity

Publisher

unverified uploader

A tool which automatically generates Flutter localization resources from CSV and Excel files.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

arb_generator, dart_style, excel, yaml

More

Packages that depend on flappy_translator