Simple project to demonstrate how to use the Crowdin SDK
Follow the steps below to run the Example project:
-
Clone this repository:
git clone git@github.com:crowdin/flutter-sdk.git. -
Navigate to the Example project directory:
cd flutter-sdk/example. -
Create a project in Crowdin. Upload the
lib/l10n/texts_en.arbfile to the Crowdin project as a source file. -
Run the
pub getcommand to get project dependencies. -
Run
flutter gen-l10n. -
Run
flutter pub run crowdin_sdk:gento generate Crowdin localization. -
Translate your file in Crowdin project and Set up a Distribution.
-
Fill in your distribution hash in the
mainfunction as adistributionHashvalue:void main() async { WidgetsFlutterBinding.ensureInitialized(); await Crowdin.init( distributionHash: 'distribution_hash', // Fill in with your distribution hash connectionType: InternetConnectionType.any, updatesInterval: const Duration(minutes: 15), ); runApp(const MyHomePage()); }
-
Run the application.