Skip to content
Open
15 changes: 15 additions & 0 deletions .changelog/20260721132553_ck_10480.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
type: Major breaking change
scope:
- ckeditor5-dev-translations
see:
- https://github.com/ckeditor/ckeditor5-commercial/issues/10480
---

The `zh_CN` and `zh_TW` locale codes have been replaced with `zh_Hans` and `zh_Hant`, respectively, to correctly represent Simplified and Traditional Chinese as script variants instead of country/region variants.

As a result:

* The `zh_TW` language code is no longer mapped to the `zh.po` file. It now emits `zh-hant.po` instead.
* The `zh_CN` language code now emits `zh-hans.po` instead of `zh-cn.po`.
* The `languageCode` for these locales changed from `zh` (for both) to `zh-Hans` and `zh-Hant`, respectively.
8 changes: 4 additions & 4 deletions packages/ckeditor5-dev-translations/lib/utils/getlanguages.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const SUPPORTED_LOCALES = [
'bs', // Bosnian
'bg', // Bulgarian
'ca', // Catalan
'zh_CN', // Chinese (China)
'zh_TW', // Chinese (Taiwan)
'zh@hans', // Chinese (Simplified)
'zh@hant', // Chinese (Traditional)
'hr', // Croatian
'cs', // Czech
'da', // Danish
Expand Down Expand Up @@ -78,12 +78,12 @@ const SUPPORTED_LOCALES = [
'uz', // Uzbek
'vi' // Vietnamese
];

const LOCALES_FILENAME_MAP = {
'ne_NP': 'ne',
'si_LK': 'si',
'sr@latin': 'sr-latn',
'zh_TW': 'zh'
'zh@hans': 'zh-hans',
'zh@hant': 'zh-hant'
Comment thread
Mati365 marked this conversation as resolved.
Outdated
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ describe( 'getLanguages()', () => {

it( 'should use predefined filename if defined', () => {
const languages = getLanguages();
const languageChineseTaiwan = languages.find( l => l.localeCode === 'zh_TW' );
const languageChineseTaiwan = languages.find( l => l.localeCode === 'zh@hans' );

expect( languageChineseTaiwan ).toEqual( {
localeCode: 'zh_TW',
localeCode: 'zh@hans',
languageCode: 'zh',
languageFileName: 'zh'
languageFileName: 'zh-hans'
Comment thread
cursor[bot] marked this conversation as resolved.
} );
} );
} );