Current Language id() returns languageCode-CountryCode but we need only language code.

Created on 24 October 2023, 8 months ago

Current Language id() returns languageCode-CountryCode but we need only language code.

In a module the line \Drupal::languageManager()->getCurrentLanguage()->getId() returns languageCode-CountryCode (hu-HU) and inserts it into 'data-culture' attributes, and it cause the issue, and the banner shows only on default language instead of current.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine Vorona Olya

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

Comments & Activities

Production build 0.69.0 2024