flutter-form-builder-ecosystem / flutter_form_builder

Simple form maker for Flutter Framework

Home Page:https://pub.dev/packages/flutter_form_builder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Localizations]: Language code fow Swedish is wrong

oakstair opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Package/Plugin version

9.1.0

Platforms

  • Android
  • iOS
  • Linux
  • MacOS
  • Web
  • Windows

Flutter doctor

Flutter doctor
€ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.4, on macOS 14.2.1 23C71 darwin-x64, locale sv-SE)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.3.6)
[✓] VS Code (version 1.52.1)
[✓] Network resources

• No issues found!

Minimal code example

Code sample
Not code related ...

Current Behavior

My application is setting language to 'sv' as this is the correct language code for Swedish.

Since FormBuilder uses 'se' which is wrong this doe snot work.

Expected Behavior

Form texts should be localizes correctly wehren using the correct language code for Swesih = 'sv'

Steps To Reproduce

  1. Create a form
  2. Set language to 'sv'
  3. Checkthat error message are in Sweidsh

Aditional information

No response

            return MaterialApp.router(
              // navigatorKey: _appRouter.navigatorKey,
              debugShowCheckedModeBanner: false,
              theme: PokerChampionTheme.dark(),
              title: 'PokerChampion',
              backButtonDispatcher: RootBackButtonDispatcher(),
              routeInformationParser: routeParser,
              routerDelegate: _appRouter,
              localizationsDelegates: [
                GlobalMaterialLocalizations.delegate,
                GlobalWidgetsLocalizations.delegate,
                GlobalCupertinoLocalizations.delegate,
                // FormBuilderLocalizations.delegate, 'sv' is currently not supported ....
              ],
              supportedLocales: [
                // const Locale('de'),
                const Locale('en'),
                // const Locale('es'),
                // const Locale('it'),
                // const Locale('pl'),
                // const Locale('ru'),
                const Locale('sv'),
              ],
            );
          },

But this is related to flutter_form_builder or to form_builder_validators ?