0
niengineering created
Dear Support,
I've a class using an external component. This component needs a format function "grid_format" I've defined as in the example below. The problem I have is that the line with ls.localize is returning always the same value of s (it's not translating. How can I achieve the goal to have a translation in this situation?
export class GridComponent extends AppComponentBase {
... skip ...
}
let ls: LocalizationService = new LocalizationService();
(window as grid_expression).grid_format = (column: any, value?: any) => {
if (value == null)
return '';
let s: string = (column.customAttributes.prefix + +value);
return ls.localize(s, AppConsts.localization.defaultLocalizationSourceName);
};
interface grid_expression extends Window {
grid_enum_format?: Function;
}
3 Answer(s)
-
0
Hi,
Does this work if you use
abp.localization.localize
function ? -
0
Hi,
it doesn't work with abp.localization.localize
-
0
Solved, my fault... there was an extra space in the string to be translated