2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 02:05:29 +00:00

Init basic localizations

This commit is contained in:
Oliver Walters
2021-02-01 16:58:08 +11:00
parent 40df490a21
commit 171d808410
3 changed files with 23 additions and 2 deletions

View File

@ -1,5 +1,7 @@
import 'dart:async';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:InvenTree/widget/category_display.dart';
import 'package:InvenTree/widget/company_list.dart';
import 'package:InvenTree/widget/location_display.dart';
@ -77,6 +79,20 @@ class InvenTreeApp extends StatelessWidget {
secondaryHeaderColor: Colors.blueGrey,
),
home: MyHomePage(title: 'InvenTree'),
localizationsDelegates: [
// ... app-specific localization delegate[s] here
// TODO: uncomment the line below after codegen
// AppLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: [
const Locale('en', ''), // English, no country code
const Locale('de', ''),
const Locale('fr', ''),
const Locale('it', ''),
],
);
}
}