Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arabic ui for authenticator #5785

Open
1 of 2 tasks
Technical-Team-4Dev opened this issue Dec 22, 2024 · 3 comments
Open
1 of 2 tasks

arabic ui for authenticator #5785

Technical-Team-4Dev opened this issue Dec 22, 2024 · 3 comments
Labels
feature-request A request for a new feature or an enhancement to an existing API or category. pending-triage This issue is in the backlog of issues to triage

Comments

@Technical-Team-4Dev
Copy link

On which framework/platform would you like to see this feature implemented?

Flutter

Which UI component is this feature-request for?

Authenticator

Please describe your feature-request in detail.

i want to ask because i am not sure i searched a lot but i got no resault , i want to make the ui of the authenicator package in amplify in arabic language can i

Please describe a solution you'd like.

making arabic ui feature for authenticator if there is no

We love contributors! Is this something you'd be interested in working on?

  • 👋 I may be able to implement this feature request.
  • ⚠️ This feature might incur a breaking change.
@Technical-Team-4Dev Technical-Team-4Dev added the feature-request A request for a new feature or an enhancement to an existing API or category. label Dec 22, 2024
@github-actions github-actions bot added pending-triage This issue is in the backlog of issues to triage pending-maintainer-response Pending response from a maintainer of this repository labels Dec 22, 2024
@Technical-Team-4Dev
Copy link
Author

here is my code

import 'package:flutter/material.dart';
import 'package:amplify_flutter/amplify_flutter.dart';
import 'package:amplify_auth_cognito/amplify_auth_cognito.dart';
import 'package:amplify_api/amplify_api.dart';
import 'package:amplify_datastore/amplify_datastore.dart';
import 'package:amplify_authenticator/amplify_authenticator.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

import 'package:technicalaccountant/amplifyconfiguration.dart';
import 'package:technicalaccountant/models/ModelProvider.dart';
import 'package:technicalaccountant/syncPages/sync_switch.dart';

class Auth extends StatefulWidget {
const Auth({Key? key}) : super(key: key);

@OverRide
State createState() => _AuthState();
}

class _AuthState extends State {
@OverRide
void initState() {
super.initState();
initPlatformState();
}

Future initPlatformState() async {
try {
if (!Amplify.isConfigured) {
await Amplify.addPlugins([
AmplifyAuthCognito(),
AmplifyDataStore(modelProvider: ModelProvider.instance),
AmplifyAPI(),
]);
await Amplify.configure(amplifyconfig);
}
} on AmplifyAlreadyConfiguredException {
debugPrint('Amplify is already configured.');
}
}

@OverRide
Widget build(BuildContext context) {
return SafeArea(
child: Authenticator(
child: MaterialApp(
debugShowCheckedModeBanner: false,
// Include the Authenticator builder.
builder: Authenticator.builder(),

      // 1. Add Arabic ('ar') to supportedLocales.
      supportedLocales: const [
        Locale('en'),
        Locale('ar'),
      ],

      // 2. Optionally force the app to use Arabic by default:
      // locale: const Locale('ar'),

      // 3. Add the AuthenticatorLocalizationsDelegate to localizationsDelegates:
      localizationsDelegates: const [
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
        GlobalCupertinoLocalizations.delegate,
      ],

      home: Builder(
        builder: (BuildContext context) {
          return const SyncPage();
        },
      ),
    ),
  ),
);

}
}

@jordanvn
Copy link
Member

Hi @Technical-Team-4Dev 👋 Thanks for opening this issue. Have you worked through the instructions for adding support for a language to the Authenticator (Authenticator > Customization > Internationalization) and created a lib/l10n/amplify_ar.arb file?

I am also transferring this ticket to amplify-flutter so you can get the most relevant help.

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Dec 23, 2024
@jordanvn jordanvn transferred this issue from aws-amplify/amplify-ui Dec 23, 2024
@github-actions github-actions bot added the pending-maintainer-response Pending response from a maintainer of this repository label Dec 23, 2024
@Technical-Team-4Dev
Copy link
Author

Hah great i will do that
And i am sorry for bathering

@ekjotmultani ekjotmultani removed the pending-maintainer-response Pending response from a maintainer of this repository label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A request for a new feature or an enhancement to an existing API or category. pending-triage This issue is in the backlog of issues to triage
Projects
None yet
Development

No branches or pull requests

3 participants