Umut Palabiyik
Umut Palabiyik

Reputation: 323

How to change FilterRow language in devextreme-react/data-grid

How can i change devextreme FilterRow ui language. For examle : I want to change "Starts with" text to "New starts with" text.

enter image description here

Upvotes: 0

Views: 650

Answers (2)

marjay
marjay

Reputation: 432

For changing the ui language for all DevExtreme components, check out the localization part of the offical documentation.

Here is an example on how to load a specific language:

// ...
// Dictionaries for German language
import deMessages from "devextreme/localization/messages/de.json";
import { locale, loadMessages } from "devextreme/localization";
  
// ===== React ======
class App extends React.Component {
    constructor(props) {
        super(props);
        loadMessages(deMessages);
        locale(navigator.language);
    }
}

Here is a list of all available languages on GitHub.

If you only want to change a specific operation text inside the data grid component, Cătălin Andrei Preda's answer is the correct one.

Upvotes: 0

Cătălin Andrei Preda
Cătălin Andrei Preda

Reputation: 108

I wonder if overriding the operationDescriptions config accomplishes what you're trying to achieve?

Check out the docs: https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/filterRow/operationDescriptions/

<DataGrid ... >
            <FilterRow ... >
                <OperationDescriptions
                    startsWith="New starts with"
                />
            </FilterRow>
</DataGrid>

Upvotes: 1

Related Questions