EA games follow the container language

Merged
UT
13h ago
+38-16

Description

Changing the container language had no effect on EA games.

The EA launcher stand-in answered en_US for the installed language, the settings language and the EAGameLocale launch variable, whatever the container language was. It now hands out the container language's locale when the game ships that language (read from the game's __Installer/installerdata.xml), and en_US otherwise.

The install script's language-specific registry values (for example Locale) were written once per prefix. They are now written again when the container language changes.

Tested on a Retroid Pocket 6 with Need for Speed Most Wanted (Steam, real Steam client launch):

  • Language set to German in the container screen: German menus, German loading screen, open world with a German HUD.
  • Language set back to English: English menus and HUD.
  • SteamInstallScriptRegistryTest and EaLsxServerTest pass.

Not covered: the Steam client rewrote the same registry values itself on each of these launches, so the registry change was not seen in isolation on an EA game.

Recording

Screenshots from the device runs are available on request.

Type of Change

  • Bug fix
  • Performance / stability improvement
  • Compatibility improvements
  • Other (requires prior approval)

Checklist

  • If I have access to #code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.
  • This change aligns with the current project scope (core functionality, stability, or performance). If not, it has been explicitly approved beforehand.
  • I have attached a recording of the change.
  • I have read and agree to the contribution guidelines in CONTRIBUTING.md.

Summary by cubic

Fixes EA games ignoring the container language, so game menus and HUD now appear in the container language when the game ships it.

  • The EA launcher stand-in now reports the container language's locale instead of always en_US, falling back to en_US when the game doesn't ship that language.
  • Install script registry values (like Locale) are re-applied when the container language changes.

Summary by CodeRabbit

  • New Features
    • EA game sessions now use the requested language when supported by the game’s installer, with English as a fallback. Game information, settings, and launch environment reflect the selected locale.
  • Bug Fixes
    • Registry settings are updated when the container language changes, so language-specific settings stay in sync.