offline_localization 1.0.2 copy "offline_localization: ^1.0.2" to clipboard
offline_localization: ^1.0.2 copied to clipboard

A Flutter package for convenient and offline localization using Excel files. Manage translations effortlessly with support for multiple languages.

example/main.dart

// example/main.dart

import 'package:offline_localization/offline_localization.dart';

void main() async {
  // Use Case 1: Initialize with Default Language
  await Loc.initialize('assets/translations.xlsx', 'en');

  // Get translations
  print('Use Case 1: ${Loc.get('hello_key')}');

  // Use Case 2: Change Locale and Retrieve Translations
  await Loc.changeLocale('assets/translations.xlsx', 'fr');

  // Get translations after changing locale
  print('Use Case 2: ${Loc.get('hello_key')}');

  // Use Case 3: Get Translation for Nonexistent Key
  print('Use Case 3: ${Loc.get('nonexistent_key')}');
}
2
likes
160
points
39
downloads

Publisher

verified publishersujal.xyz

Weekly Downloads

A Flutter package for convenient and offline localization using Excel files. Manage translations effortlessly with support for multiple languages.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

excel, flutter

More

Packages that depend on offline_localization