Skip to content

Content Translation: Expand default supported target languages - #986

Open
wprashed wants to merge 6 commits into
WordPress:developfrom
wprashed:add/content-translation-languages
Open

wprashed wants to merge 6 commits into
WordPress:developfrom
wprashed:add/content-translation-languages

Conversation

@wprashed

@wprashed wprashed commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

What?

Closes #981

Expands the default target languages supported by the Content Translation experiment in WordPress/ai to include 9 additional languages:

  • Bengali (bn)
  • Indonesian (id)
  • Polish (pl-pl)
  • Portuguese (Portugal) (pt-pt)
  • Russian (ru-ru)
  • Swedish (sv-se)
  • Turkish (tr-tr)
  • Ukrainian (uk)
  • Vietnamese (vi)

Also updates docs/experiments/content-translation.md to list the newly supported languages.

Why?

WordPress powers websites across the globe in dozens of languages. Providing broader default language coverage out of the box makes the Content Translation experiment immediately useful to non-English sites without requiring manual filter registration.

How?

  • Added the 9 languages with localized exonym labels (__( '...', 'ai' )) into Languages::get_supported_languages() in includes/Experiments/Content_Translation/Languages.php.
  • Updated LanguagesTest::test_supported_languages_filter_can_add_custom_language() to use Esperanto (eo) as the custom filter test language instead of Polish (pl-pl), since Polish is now supported by default.
  • Updated documentation in docs/experiments/content-translation.md to list all 23 default target languages in alphabetical order.

Use of AI Tools

AI assistance: Yes
Tool(s): Antigravity
Used for: Identifying missing languages, diagnosing test runner behavior, updating documentation, and formatting PR details.

Testing Instructions

  1. Enable the Content Translation experiment in AI Settings.
  2. In the Block Editor, test translating content and verify the new target languages appear in the language selection menu.
  3. Verify custom languages can still be added/removed using the wpai_content_translation_languages filter.
  4. Run npm run test:php or unit tests to ensure all language tests pass.

Screenshots or screencast

N/A - Non-visual backend and documentation additions.

Before After
N/A N/A

Changelog Entry

Added - 9 new default target languages to the Content Translation experiment.

Open WordPress Playground Preview

@wprashed
wprashed requested a review from a team August 30, 2026 07:19
@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: wprashed <wprashed@git.wordpress.org>
Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>
Co-authored-by: theaminulai <theaminuldev@git.wordpress.org>
Co-authored-by: noruzzamans <noruzzaman@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov

codecov Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.52%. Comparing base (f5dd5d8) to head (57250ce).

Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #986      +/-   ##
=============================================
+ Coverage      81.51%   81.52%   +0.01%     
  Complexity      2924     2924              
=============================================
  Files            122      122              
  Lines          11655    11664       +9     
=============================================
+ Hits            9500     9509       +9     
  Misses          2155     2155              
Flag Coverage Δ
unit 81.52% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

dkotter
dkotter previously approved these changes Aug 31, 2026
@dkotter

dkotter commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

@wprashed Thanks for the contribution. As mentioned here, please ensure your PR description has all required items from our PR template.

Comment thread includes/Experiments/Content_Translation/Languages.php
@wprashed
wprashed requested a review from theaminulai September 7, 2026 06:06
@jeffpaul

Copy link
Copy Markdown
Member

@estelaris for your review on languages added covering your needs ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Look to increase the number of languages we support by default for Content Translation

5 participants