Add Croatian and Slovenian localizations, implement locale preferences, and update settings screen

- Created `app_localizations_hr.dart` and `app_localizations_sl.dart` for Croatian and Slovenian translations.
- Added `app_sl.arb` file for Slovenian localization strings.
- Enhanced `main.dart` to support locale selection and initialization.
- Updated `home_screen.dart` and `settings_screen.dart` to handle locale changes and display current language.
- Implemented `locale_preferences.dart` service for managing locale settings using SharedPreferences.
- Modified `pubspec.yaml` to include `flutter_localizations` and enable localization file generation.
This commit is contained in:
Janez T
2025-10-16 14:42:43 +02:00
parent 95333a13b8
commit 4c8e0e5d61
15 changed files with 2615 additions and 214 deletions

View File

@@ -30,6 +30,11 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
# Internationalization
intl: any
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
@@ -90,6 +95,9 @@ flutter:
# the material Icons class.
uses-material-design: true
# Enable generation of localization files
generate: true
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg