Hi Chethana,
Translation of DG2 label is not supported by batch translate , but can be done via js
try this in html snippet setting Javascript
setTimeout(function() {
function translatePagingStatusToFrench() {
var pagingStatusElements = document.querySelectorAll('.paging-status');
pagingStatusElements.forEach(function(pagingStatus) {
var text = pagingStatus.innerHTML.trim();
var parts = text.match(/(\d+)\s*to\s*(\d+)\s*of\s*(\d+)/);
if (parts && parts.length === 4) {
var start = parts[1];
var end = parts[2];
var total = parts[3];
var frenchText = `${start} à ${end} sur ${total}`;
pagingStatus.innerHTML = frenchText;
}
});
}
translatePagingStatusToFrench();
var paginationButtons = document.querySelectorAll('.pagination-button');
paginationButtons.forEach(function(button) {
button.addEventListener('click', function() {
setTimeout(translatePagingStatusToFrench, 500);
});
});
}, 2000);
Hope it helps!
Given issue above is working fine in DataGrid but issue is coming for datagrid2 only. Please suggest if any one has implemented this.
You can do so via css. See this doc https://community.mendix.com/link/space/ui-%26-front-end/exchanges/41
To be honest this is no solution, these are all workarounds for a BUG in the datagrid2 which is a Mendix widget. Mendix wants to be a Low-Code platform for big sized companies and is high priced. As a customer workarounds like this are not acceptable. This must be fixed!
DataWidgets 3.9.0 has an option to set the current page and total record count on page variables or attributes, allowing you to take full control of showing these values.
hi,
In Data Grid 2, the pagination text (e.g., “{1} to {2} of {3}”) is currently not configurable via the standard Mendix language translation (Texts → Language).
So your observation is correct:
→ Batch translation will not affect Data Grid 2 pagination
As of now, there is:
to change pagination text in Data Grid 2
If localization is required, the only reliable approach is:
Customize the Data Grid 2 widget
Steps:
You can override using CSS:
.mx-datagrid2-paging-text {
display: none;
}
Then add your own label separately in the UI.
Limitation: