How to add missing ExtJS 6 locale properties in your application

In this article I will show you how you can add missing locale properties in Ext JS 6. I had this problem when I built software for a German customer.

The sample I use is in the Ext.form.Date field, where the formatText is missing in the ext-locale-de.js file in the ext/classic/locale/overrides/de folder.

Ext JS Locale missing property

As you can see it showing the text when hovering in English and we want it in German. Let’s repair this.

Locale in your app.json file

In your app.json you have added the following lines (depending on your language):

Overriding the Ext.form.Date object to add the missing property

Now depending if you have a workspace or just an application you create in the overrides folder of your workspace or application the following folders:

The “de” has to be the id for the language that you need. You can find the locales when browsing the ext/classic/locale/overrides/ folder.

Now add the following content in a new file with the name Ext.locale.de.form.field.Date.js in the folder you just have created:

After saving the file you can refresh your app. Sencha Cmd will pick up the overrides and the result should now be:

Ext JS Locale missing property

It is only overriding the property just added, the other properties stay intact.

Ext JS Locale missing property

The approach with overrides in Sencha Cmd is parallel to how it handles SASS.

Johan van de Merwe
Dedicated to professional software development since 1985. Has worked since 1992 as IT manager in several international operating companies. Since 2007 CEO and Sencha Ext JS web application developer at Enovision GmbH.

Leave a Reply

Time limit is exhausted. Please reload CAPTCHA.