Documentation
Initial Setup Required
Before using XLIFF Translator, you need to configure your Angular application for internationalization.
Getting Started with XLIFF Translator
Selecting Repositories
After connecting to a Git provider:
To connect, generate a Personal Access Token with the following scopes:
- repo
- read:org
Get your token here: Settings > Developer settings > Personal access tokens > Tokens (classic) > Generate new token
- Select a provider: Choose from GitHub, GitLab, or Bitbucket
- Configure access: Create and provide the appropriate tokens
- Save your configuration: Enter your token and save the connection
Github
Create a Personal Access Token with repo, and repo:org scopes.
GitLab
Create a Personal Access Token with api, read_repository, and write_repository scopes.
Bitbucket
Create an App Password with repository:read and repository:write permissions.
Repository Management
Selecting Repositories
After connecting to a Git provider:
- Navigate to the provider's page where your repositories are listed
- Browse and select the repository containing your Angular project with XLIFF files
- Specify the branch to work with (default is usually the main branch)
Translation Options
Reviewing and Finalizing
Pull Request Review
After the translation process completes:
- Review the created pull request in your Git provider
- Check the translated content for accuracy
- Make any necessary adjustments directly in the XLIFF files
- Merge the pull request to update your main codebase with the translations
This workflow allows you to keep translations in your version control system and follow standard code review practices for translation updates.
Tips for Effective Translation
- Run translations regularly as you develop to avoid large batches of untranslated content
- Create a dedicated branch for translations to keep them separate from feature development
- Ensure your source code has clear context for translation units to improve AI translation quality
- Always review AI-generated translations, especially for critical user-facing content
- Use specific file patterns to target translations for one language at a time
Additional Resources
Angular i18n Documentation
Official Angular documentation for internationalization.
ng-extract-i18n-merge
Tool for extracting and merging i18n translations in a single step.
Angular i18n CLI
CLI tool to simplify Angular i18n configuration and locale management.
Working with Marked Text
Learn about advanced i18n features like pluralization and selection.
Translation Workflow
Estimation
Before running a translation, you can estimate the scope and complexity of the task:
- Select the repository you want to work with
- Click on "Estimate" to analyze your XLIFF files
- Configure the estimate options:
- Branch: Select the branch containing your XLIFF files
- File Pattern: By default "xlf" to search all XLIFF files. Use specific patterns like "ru.xlf" to target only Russian files
- Translation State: Choose which translation units to include (default is "new" to focus on untranslated content)
- Review the estimate results showing the number of translation units to process
Why Estimate?
The estimation process helps you understand:
- The exact number of translation units that need processing
- How many credits will be required (1 translation unit = 1 credit)
- Approximate time required (each translation unit takes 10-20 seconds to process)
Important: Large translation projects with hundreds of translation units can take significant time. Plan accordingly.
Translation
Running an AI-powered translation is a separate process from estimation:
- Select the repository containing your XLIFF files
- Click on "Translate" to begin the process
- Configure the translation options:
- Branch: Select the source branch
- File Pattern: Specify which XLIFF files to translate
- Translation State: Select which translation units to process (e.g., "new", "needs-translation")
- Target State: Define the state to set for translated units (e.g., "translated", "final")
- Start the translation process
You'll be prompted with the translation options modal as shown earlier in the "Selecting Repositories" section.
Translation Process
During the translation process, XLIFF Translator:
- Clones your project repository
- Identifies XLIFF files matching your pattern
- Analyzes each translation unit and its context in the source code
- Sends translation instructions to the AI engine with relevant context
- Updates the XLIFF files with the translations
- Creates a pull request with the changes (if configured)