Add ability to use language codes in dropdown

Created on 11 February 2022, almost 3 years ago
Updated 18 July 2024, 4 months ago

Problem/Motivation

Currently, the only method of displaying the language options in the dropdown is by displaying the full language name. There are certain use cases in which it would be preferable to be able to use the language code for a language instead in the dropdown.

Proposed resolution

  • Add an option on the GTranslate Settings configuration page to enable/disable the usage of the language code
  • Update the GTranslate Block to use the language code when this setting is enabled
Feature request
Status

Needs review

Version

3.0

Component

Code

Created by

🇨🇦Canada nord102

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇦Canada metasim

    Since this fix was implemented for 8.x-1.x-dev and the current version is 3.0.1 there have been a lot of changes with the core of the module, so instead of rerolling the patch, I have created a new way to achieve the same functionality.

    My fix allows the user to select between a regular `Dropdown` and `Dropdown with Language Code` under `Widget Look` field.

    I have added a new widget type and duplicated/repurposed the dropdown.js to achieve this.

  • 🇳🇱Netherlands dennisdk

    Works great!
    However I would vote to remove the "select_language_label" if we are only showing the langcodes anyway.

  • Merge request !24Resolve #3263918 "Add langcodes dropdown" → (Open) created by dennisdk
Production build 0.71.5 2024