Get Free Trial
Get Free Trial

How to Localize filed values or columns names under All Fields we get?

Answered
Kranthi asked on September 18, 2019

I know we have Localization feature for Flexmonster component.
 global: {
                        localization: ‘en.json’
            },
 
The above code is working for me if I change any label values in en.json?
 
 
But how to localize the json columns we get under the All fields(Please find the attachment for reference).
I screen shot for example I want to localize city to MyCity, Color to color, M to mmm etc…
 
I don’t want it to be done in json file where we get data, but through localization JSON file.
The captions for the fields should be taken form the localization file given.
 
Thanks,
Kranthi 

Attachments:
LocalizeFieldNames.PNG

5 answers

Public
Vera Didenko Flexmonster September 18, 2019

Hello, Kranthi,
 
Thank you for writing to us.
 
We would like to explain that the Field names cannot be customized via the localization file. 
The reason for this is that Field names are loaded from the data source. 
 
You can change the Field names by specifying captions for your Fields.
For JSON and CSV data sources, captions can be defined in the mapping property (please see: https://jsfiddle.net/flexmonster/gbjs7tw1/ ).
 
Please let us know if you have any questions.
 
Best Regards,
Vera

Public
Kranthi September 19, 2019

Hi Vera,
 
The Mapping property is not working in my angularJS solution.
I have even used the same data and mapping which you have given in the above example.
But the caption text given is not showing in the report.
 
Thanks,
Kranthi

Public
Vera Didenko Flexmonster September 19, 2019

Hello, Kranthi,
 
Thank you for your response.
 
The mapping property seems to be working fine for AngularJS on our end.
We kindly suggest updating to the latest version of Flexmonster, since the mapping property has been added recently to Flexmonster (in the minor release version 2.7.14).
 
Also, our team has prepared an example of using mapping in AngularJS (please see the attached file AngularJS-example-mapping.html).
 
Please let us know if this works on your end.
 
Waiting for your reply.
 
Best Regards,
Vera

 

Public
Kranthi September 20, 2019

Hi Vera,

I have updated to version 2.7.14 and the mapping is working fine now.
We are using typescript for our application.
May I know the equivalent typescript version for 2.7.14 JavaScript?
When I run the npm command “npm install –save-dev @types/flexmonster” the below type script version with 2.7.10 got added under devDependencies.
@types/flexonster”: “^2.7.10” 
 
Please let us know if 2.7.10 is the equivalent typescript version for 2.7.14 JavaScript.
 
Thanks,
Kranthi
 

 

Public
Vera Didenko Flexmonster September 20, 2019

Hello, Kranthi,
 
Thank you for your answer.
 
We are glad to hear that the mapping property works fine for you.
 
We would like to confirm that the 2.7.10 version of @types/flexmonster is the latest one and corresponds to the 2.7.14 version of Flexmonster.
The reason for the inconsistency with the minor version numbers is that the minor version number for @types/flexmonster is assigned by DefinitelyTyped, it is not set by Flexmonster.
 
Please let us know if you have any questions. 
 
Best Regards,
Vera

Please login or Register to Submit Answer