Skip to content

Load nested language files using dotted keys - #1385

Merged
asika32764 merged 2 commits into
masterfrom
copilot/fix-nested-json-yaml-loading
Nov 8, 2026
Merged

asika32764 merged 2 commits into
masterfrom
copilot/fix-nested-json-yaml-loading

Conversation

Copilot AI commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Nested JSON, PHP, and YAML language fixtures decode to arrays, but the loader passed those arrays to a string-only method. YAML parsing also depends on an optional Symfony package that wasn’t listed in the language package’s suggestions.

  • Nested translations: Recursively flatten arrays into dotted keys while preserving flat entries.
  • YAML support: Suggest symfony/yaml; cover the YAML fixture only when the parser is available.
  • Example: {"windwalker":{"language-test":{"sakura":"Sakura"}}} resolves as:
$lang->trans('windwalker.language.test.sakura'); // Sakura

Co-authored-by: asika32764 <1639206+asika32764@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix loading of nested JSON and YAML language files Load nested language files using dotted keys Nov 7, 2026
Copilot AI requested a review from asika32764 November 7, 2026 17:47
@asika32764
asika32764 marked this pull request as ready for review November 8, 2026 03:57
@asika32764
asika32764 merged commit 86ca2fb into master Nov 8, 2026
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.

Nested JSON/YAML/PHP language files fail to load; fixtures suggest nesting is supported

2 participants