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

@@ -246,6 +246,11 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.0.0"
flutter_localizations:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_map:
dependency: "direct main"
description:
@@ -361,7 +366,7 @@ packages:
source: hosted
version: "4.1.2"
intl:
dependency: transitive
dependency: "direct main"
description:
name: intl
sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5"