Skip to content

Language

Choose your language

Switch to the same page in another language.

EnglishEnglishenAfrikaansAfrikaansafአማርኛAmharicamالعربيةArabicarঅসমীয়াAssameseasAzərbaycanAzerbaijaniazБашҡортBashkirbaБългарскиBulgarianbgभोजपुरीBhojpuribhoবাংলাBanglabnབོད་སྐད་Tibetanboबड़ोBodobrxBosanskiBosnianbsCatalàCatalancaČeštinaCzechcsCymraegWelshcyDanskDanishdaDeutschGermandeडोगरीDogridoiDolnoserbšćinaLower SorbiandsbދިވެހިބަސްDivehidvΕλληνικάGreekelEspañolSpanishesEestiEstonianetEuskaraBasqueeuفارسیPersianfaSuomiFinnishfiFilipinoFilipinofilVakavitiFijianfjFøroysktFaroesefoFrançaisFrenchfrFrançais (Canada)French (Canada)fr-CAGaeilgeIrishgaGalegoGalicianglकोंकणीKonkanigomગુજરાતીGujaratiguHausaHausahaעבריתHebrewheहिन्दीHindihiछत्तीसगढ़ीChhattisgarhihneHrvatskiCroatianhrHornjoserbsceUpper SorbianhsbHaitian CreoleHaitian CreolehtMagyarHungarianhuՀայերենArmenianhyIndonesiaIndonesianidÌgbòIgboigInuinnaqtunInuinnaqtuniktÍslenskaIcelandicisItalianoItalianitᐃᓄᒃᑎᑐᑦInuktitutiuInuktitut (Latin)Inuktitut (Latin)iu-Latn日本語JapanesejaქართულიGeorgiankaҚазақ ТіліKazakhkkខ្មែរKhmerkmKurmancîKurdish (Northern)kmrಕನ್ನಡKannadakn한국어KoreankoكٲشُرKashmiriksکوردیی ناوەندیKurdish (Central)kuКыргызчаKyrgyzkyLëtzebuergeschLuxembourgishlbLingálaLingalalnລາວLaoloLietuviųLithuanianltLugandaGandalugLatviešuLatvianlv中文 (文言文)Chinese (Literary)lzhमैथिलीMaithilimaiMalagasyMalagasymgTe Reo MāoriMāorimiМакедонскиMacedonianmkമലയാളംMalayalammlМонгол хэлMongolian (Cyrillic)mn-Cyrlᠮᠣᠩᠭᠣᠯ ᠬᠡᠯᠡMongolian (Traditional)mn-MongমৈতৈলোনManipurimniमराठीMarathimrMelayuMalaymsMaltiMaltesemtHmong DawHmong Dawmwwမြန်မာMyanmar (Burmese)myNorsk BokmålNorwegian BokmålnbनेपालीNepalineNederlandsDutchnlSesotho sa LeboaSesotho sa LeboansoChinyanjaChichewanyaଓଡ଼ିଆOdiaorHñähñuQuerétaro OtomiotqਪੰਜਾਬੀPunjabipaPolskiPolishplدریDariprsپښتوPashtopsPortuguês (Brasil)Portuguese (Brazil)ptPortuguês (Portugal)Portuguese (Portugal)pt-PTRomânăRomanianroРусскийRussianruIkirundiRundirunKinyarwandaKinyarwandarwسنڌيSindhisdසිංහලSinhalasiSlovenčinaSlovakskSlovenščinaSlovenianslGagana SāmoaSamoansmchiShonaShonasnSoomaaliSomalisoShqipAlbaniansqСрпски (ћирилица)Serbian (Cyrillic)sr-CyrlSrpski (latinica)Serbian (Latin)sr-LatnSesothoSesothostSvenskaSwedishsvKiswahiliSwahiliswதமிழ்TamiltaతెలుగుTeluguteไทยThaithትግርTigrinyatiTürkmen DiliTurkmentkLea fakatongaTongantoTürkçeTurkishtrТатарTatarttReo TahitiTahitiantyئۇيغۇرچەUyghurugУкраїнськаUkrainianukاردوUrduurUzbek (Latin)Uzbek (Latin)uzTiếng ViệtVietnameseviisiXhosaisiXhosaxhÈdè YorùbáYorubayoYucatec MayaYucatec Mayayua粵語Cantonese (Traditional)yue中文 (简体)Chinese Simplifiedzh-Hans中文 (繁體)Chinese Traditionalzh-HantisiZuluisiZuluzu

Setup

Getting started

Add a workflow file, choose your translation provider — Azure, AWS, or Google — and the action scans source-language resource files, translates only what changed, and emits translated siblings.

On this page

    Step 1: Choose a translation provider

    The action works with Azure AI Translator, AWS Translate, and Google Cloud Translation behind one unified API surface. Pick a single provider per run with the provider input — the workflow behaves identically regardless of provider; only the credentials differ. See Translation providers for a full comparison.

    Step 2: Add credentials and a workflow

    Store your provider's credentials as GitHub repository secrets, then create .github/workflows/translate.yml. Select your provider below for its specific setup — the rest of the workflow is identical.

    Azure AI Translator

    Azure is the default provider, so provider may be omitted. Provision an Azure AI Translator resource in the Azure portal, then store its credentials:

    Store these as repository secrets

    • TRANSLATOR_KEY — the subscription key for the resource.
    • TRANSLATOR_ENDPOINT — the regional endpoint URL.
    • TRANSLATOR_REGION — the resource's Azure region.

    Add the workflow

    .github/workflows/translate.yml
    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-translation

    Step 3: Commit a source resource file

    Resource files use the Name.<sourceLocale>.<ext> convention. For example Greetings.en.resx becomes Greetings.fr.resx, Greetings.de.resx, and so on after a run.

    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

    Once the workflow finishes, the action exposes three outputs you can wire into a PR description: summary-title, summary-details, and has-new-translations. It also writes a Markdown summary into the job page via core.summary.

    Next steps