Skip to content

tempo-riz/vscode-dart-extract-arb

Repository files navigation

Features

This extension adds a single code action :

Extract String to ARB

Extract selected text, prompt for a key, add it to the ARB file, and translate it with DeepL for other ARB files.

Quick Setup

You should already have a l10n.yaml file in your project. If not, create one. it uses flutter's official options for internationalization. see here

This plugins extends existing options with the following options:

Options with default values

# l10n.yaml (plugin specific options)
translate: true                             # Enable translation 
key-prefix: AppLocalizations.of(context).   # Key prefix for translation
import-line: ""                             # Import line if needed
auto-name-key: false                        # Generate keys name 

For the translation feature to work, you need to add your Deepl API key in vscode settings.json file:

"flutter.deeplApiKey": "your-key",

You can get a free one here

And that's it! You're ready to go 🚀

Links

Download the extension from the Visual Studio Marketplace or the Open VSX Registry

If you want to add a feature or file a bug, please open an issue/PR on the GitHub repository

About

VS Code Extension to Extract Flutter text into ARB localization files. Supports DeepL auto-translation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published