Skip to content

Conversation

@verma-divyanshu-git
Copy link
Contributor

What

This PR adds a comprehensive Flutter CLI integration guide following the structure and content of existing framework guides.

Why

Closes #1340

Flutter developers need a step-by-step guide to integrate Lingo.dev CLI with their Flutter applications using ARB (Application Resource Bundle) files.

How

The guide covers:

  • Setting up a Flutter project with localization dependencies
  • Creating and configuring ARB files
  • Configuring Lingo.dev CLI with the flutter bucket type
  • Implementing locale switching in Dart
  • Testing translations with flutter run

Testing

  • Tested the complete guide by following all steps

@davidturnbull
Copy link
Contributor

Hi 👋

Thanks for the submission. I'll follow this guide shortly and let you know if I have any feedback.

😄

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a comprehensive Flutter CLI integration guide to help Flutter developers integrate Lingo.dev CLI for AI-powered translations using ARB (Application Resource Bundle) files.

Key changes:

  • Complete step-by-step setup guide for Flutter localization with Lingo.dev
  • Code examples for ARB files, configuration files, and Dart implementation
  • Testing instructions and known limitations section

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

),
const SizedBox(height: 20),
Text(
localizations.greeting('Flutter'),
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The example code passes 'Flutter' as a hardcoded string to the greeting method, but the ARB file defines the placeholder parameter as 'name'. For clarity in documentation, consider using a more obvious user name like 'John' (which matches the example in the ARB file at line 76) or 'User' to better illustrate that this is meant to be a dynamic value representing a person's name.

Suggested change
localizations.greeting('Flutter'),
localizations.greeting('John'),

Copilot uses AI. Check for mistakes.

## Known limitations

- The locale codes that Flutter supports aren't guaranteed to match the locale codes that Lingo.dev supports. Flutter uses language codes like `en`, `es`, `fr`, while some locales may require country codes like `zh_CN` or `pt_BR`.
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The explanation about locale code mismatches could be clearer. The statement implies Flutter uses simple language codes while 'some locales' need country codes, but Flutter actually supports both formats (e.g., Locale('zh', 'CN') and Locale('en')). Consider revising to clarify that both systems support language-only and language-country codes, but the specific supported locale codes may differ between the two platforms.

Suggested change
- The locale codes that Flutter supports aren't guaranteed to match the locale codes that Lingo.dev supports. Flutter uses language codes like `en`, `es`, `fr`, while some locales may require country codes like `zh_CN` or `pt_BR`.
- The locale codes supported by Flutter and Lingo.dev may not always match exactly. Both systems support language-only codes (like `en`, `es`, `fr`) and language-country codes (like `zh_CN`, `pt_BR`). However, the specific set of supported locale codes can differ between the two platforms, so you may need to adjust your locale configuration to ensure compatibility.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: create a Lingo.dev CLI integration guide for Flutter

3 participants