Support multi-part language codes

Created on 24 July 2024, 5 months ago
Updated 12 August 2024, 4 months ago

Problem/Motivation

Some languages can have two parts to their language ID. Mandarin, for example has an ID of ZH-HANS. The problem is a dash isn't a valid character for enum values according to the GraphQL specification.

Steps to reproduce

  1. Go to Configuration > Regional and language > Languages
  2. Click "Add language" and select one of the Chinese languages.
  3. Clear caches
  4. Go to Configuration > Web services > GraphQL
  5. Select the Explorer for your GraphQL server and you should get an error.

Proposed resolution

When building the language enum convert the dashes to underscores which are valid characters.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇦Canada swickham

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024