Step 1: Londa omuvvuunuzi w'ebitabo
Ekikolwa kino kikola ne Azure AI Translator, AWS Translate, ne Google Cloud Translation emabega w'ekizimbe ekimu ekya API. Pick a single provider per run with the provider input — the workflow behaves identically regardless of provider; Ebiwandiiko byokka byawukana. Laba Abavvuunuzi okugeraageranya mu bujjuvu.
Step 2: Add credentials and a workflow
Tereka ebiwandiiko by'omuweereza wo ng'ebyama bya GitHub, oluvannyuma okole .github/workflows/translate.yml. Select your provider below for its specific setup — the rest of the workflow is identical.
Azure AI Translator
Mu ngeri y'emu, Ssekabaka Muteesa II y'omu ku bakyala abatalina mwasirizi, n'olwekyo provider ayinza okulemererwa okutuukiriza obuvunaanyizibwa bwe. Provide an Azure AI Translator resource in the Azure portal, then store its credentials:
Zitereke ng'ebyama by'obukuumi
TRANSLATOR_KEY— The subscription key for the resource.TRANSLATOR_ENDPOINT— the regional endpoint URL.TRANSLATOR_REGION— Bye bye Azure region.
Add the workflow
name: translate
on: push: branches: [main] paths: - "src/**/*.en.resx" - "src/**/*.en.json"
permissions: contents: write pull-requests: write
jobs: translate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - id: translate uses: IEvangelist/resource-translator@v3 with: provider: | azure: subscriptionKey: ${{ secrets.TRANSLATOR_KEY }} endpoint: ${{ secrets.TRANSLATOR_ENDPOINT }} region: ${{ secrets.TRANSLATOR_REGION }} sourceLocale: en toLocales: '["fr","de","es"]' - if: steps.translate.outputs.has-new-translations == 'true' uses: peter-evans/create-pull-request@v7 with: title: ${{ steps.translate.outputs.summary-title }} body: ${{ steps.translate.outputs.summary-details }} branch: machine-translationAWS Translate
Set provider to aws. Prefer OIDC via aws-actions/configure-aws-credentials so no long-lived secrets are stored — the step exports AWS_REGION for you. To use static keys instead, store:
Zitereke ng'ebyama by'obukuumi
AWS_ACCESS_KEY_ID— Your AWS access key ID.AWS_SECRET_ACCESS_KEY— Ekisumuluzo kyo eky'ekyama ekya AWS
A region is always required — set it with awsRegion or the AWS_REGION environment variable.
Add the workflow
name: translate
on: push: branches: [main] paths: - "src/**/*.en.resx" - "src/**/*.en.json"
permissions: id-token: write # for aws-actions/configure-aws-credentials (OIDC) contents: write pull-requests: write
jobs: translate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: arn:aws:iam::123456789012:role/gh-actions-translate aws-region: us-east-1 - id: translate uses: IEvangelist/resource-translator@v3 with: provider: | aws: region: us-east-1 # or rely on AWS_REGION from the step above formality: FORMAL brevity: true sourceLocale: en toLocales: '["fr","de","es"]' - if: steps.translate.outputs.has-new-translations == 'true' uses: peter-evans/create-pull-request@v7 with: title: ${{ steps.translate.outputs.summary-title }} body: ${{ steps.translate.outputs.summary-details }} branch: machine-translationGoogle Cloud Translation
Set provider to google. Authenticate with either a service-account JSON credential or an API key — provide exactly one:
Zitereke ng'ebyama by'obukuumi
GCP_TRANSLATE_CREDENTIALS— Ekisumuluzo kya JSON (nga JSON String).GCP_TRANSLATE_API_KEY— Oba ekisumuluzo kya Google Cloud API.
An optional googleProjectId is inferred from the credential when omitted.
Add the workflow
name: translate
on: push: branches: [main] paths: - "src/**/*.en.resx" - "src/**/*.en.json"
permissions: contents: write pull-requests: write
jobs: translate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - id: translate uses: IEvangelist/resource-translator@v3 with: provider: | google: # Provide EITHER a service-account JSON credential... credentials: ${{ secrets.GCP_TRANSLATE_CREDENTIALS }} # ...OR an API key: # apiKey: ${{ secrets.GCP_TRANSLATE_API_KEY }} model: nmt sourceLocale: en toLocales: '["fr","de","es"]' - if: steps.translate.outputs.has-new-translations == 'true' uses: peter-evans/create-pull-request@v7 with: title: ${{ steps.translate.outputs.summary-title }} body: ${{ steps.translate.outputs.summary-details }} branch: machine-translationStep 3: Commit a source resource file
Resource files use the Name.<sourceLocale>.<ext> convention. Eky'okulabirako, Greetings.en.resx Greetings.fr.resx, Greetings.de.resx, n'ebirala oluvannyuma lw'okudduka.
Step 4: Let smart change detection protect your bill
changeDetection defaults to smart and stores a compact .github/resource-translator-state.json manifest in the repo. Commit that file so future runs can reuse stable translations, preserve manual target edits, and send only new, missing, changed, or settings-invalidated keys to the provider. If localized files already exist, run once with snapshotOnly: true to create the manifest without provider calls.
Step 5: Inspect the output
Ng'omulimu guwedde, ekikolwa kiraga ebivaamu bisatu by'osobola okukozesa mu kunnyonnyola PR: summary-title, summary-details, ne has-new-translations. It also writes a Markdown summary into the job page via core.summary.