When using the AMD approach (via require JS) for loading the ignite UI components it is not clear how or if one might properly include either an ignite i18n file or a custom file.
It appears that once the core infragistics assets are loaded by requirejs that changes to the various locale properties like
$.ig.GridPaging.locale.pageSizeDropDownLabel
will have no effect on subsequently constructed controls.
Kind Regards,
Chad
Hello,
I will further look into this and update you with more details.
I did determine that I can undefine the ignite modules, assign custom text to the locale data, and reload the ignite modules with the new locale data.
require.undef("igniteui-core"); require.undef("igniteui-lob");
$.extend($.ig.GridPaging, {
locale: { pageSizeDropDownLabel: "page" } });
require(["igniteui-core", "igniteui-lob"], function () { ... });
It appears, however, that one cannot use this approach to load a different region file -- such as infragistics.ui.grid-ja.js -- since they are written as singletons -- without removing the $.ig.Grid (for example) from $.
Regards,
Thank you for sharing this with the community.
We believe it is important to share knowledge across users of the forum as there are many APIs available.
Let me know if you need further assistance.
An alternative to reloading the locale files is to set the various "labels", "text", and "tooltips" via the options of the various widgets. For instance, you can specify the following localization options (which are also in the infragistics api documentation) for $.ig.GridPaging:
//Localizations pageSizeDropDownLabel: "", pageSizeDropDownTrailingLabel: "", nextPageLabelText: "", prevPageLabelText: "", firstPageLabelText: "", lastPageLabelText: "", pageSizeDropDownTooltip: "", pagerRecordsLabelTooltip: "", prevPageTooltip: "", nextPageTooltip: "", firstPageTooltip: "", lastPageTooltip: "", pageTooltipFormat: "", pagerRecordsLabelTemplate: ""
when defining the paging "feature" for an igGrid.