Localizing the row-editor buttons via overrides and Sencha Cmd

If you are using the RowEditing plugin in your grid you are used to the “Update” and “Cancel” buttons. But localization for “de” is missing. So I did them myself using the overrides-folder of my application.

I create a file RowEditor within the subfolder grid inside the overrides-folder itself.


I dropped this code (note: the buttons itself are defined within Ext.grid.RowEditor not in the Ext.grid.plugin.RowEditing)

 * A simple override for changing the default text of the row-editing row-editor
 * @author Eric Bartels
Ext.define('Overrides.grid.RowEditor', {
  override: 'Ext.grid.RowEditor',
  cancelBtnText: 'Abbrechen',
  saveBtnText: 'Speichern'

… added this class to my requires-section in the grid thats using it (could also be done globally in your Application.js).

// ...
requires: ['Overrides.grid.RowEditor']
// ...


For the record: In this case I used Ext JS 5.1.1 with Sencha Cmd

1 Comment

  1. No need to add the override to the requires array in your application. If you place the override in the overrides directory like you show, after a “sencha app build testing|production” or “sencha app watch” picks up the change, Cmd will automatically include all classes in the overrides directory which will then automatically include your override.

    The same goes for the overrides directory in a Cmd package when the package is required in your app.json.

Comments are closed.