We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Display multiple language entries

Hi,

I am trying to display and edit some meta data in multiple languages and not all of them are in simple latin characters (such as arabic, chinese, etc). The page is already defined with utf-8 charset. The data transmission back and forth with the server and database are all properly encoded in Base64, to ensure there is no corruption through serialization, so I am confident there is no problem with the strings.

Now I need help to indicate to ejs-grid to identify the locale of the row using one of the fields, so the text is presented in proper unicode characters instead of question marks.

Your help in pointing me to the right direction is highy apprciated.

Thanks and best regards,
Sathya

3 Replies

TS Thavasianand Sankaranarayanan Syncfusion Team December 23, 2019 10:30 AM UTC

Hi Sathyanarayanan, 

Greetings from Syncfusion support. 

Query : Now I need help to indicate to ejs-grid to identify the locale of the row using one of the fields, so the text is presented in proper unicode characters instead of question marks. 
 
We could see that you want to use multiple languages in the grid. by default, the grid uses only one locale at a time. So you can achieve your requirement by using the valueAccessor property for field you need. Please refer the below documentation for more information. 

 
Regards, 
Thavasianand S. 



SS Sathyanarayanan Srinivasan replied to Thavasianand Sankaranarayanan December 23, 2019 11:49 PM UTC

Hi Sathyanarayanan, 

Greetings from Syncfusion support. 

Query : Now I need help to indicate to ejs-grid to identify the locale of the row using one of the fields, so the text is presented in proper unicode characters instead of question marks. 
 
We could see that you want to use multiple languages in the grid. by default, the grid uses only one locale at a time. So you can achieve your requirement by using the valueAccessor property for field you need. Please refer the below documentation for more information. 

 
Regards, 
Thavasianand S. 


Thanks Thavasi... Could you also help with a sample as to how I can set the locale from a valueAccessor please? the text variables are already in unicode (utf-8 encoding). I am unable to figure out how to express the locale to syncfusion grid framework.

Thanks and best regards,
Sathya


TS Thavasianand Sankaranarayanan Syncfusion Team December 24, 2019 12:15 PM UTC

Hi Sathyanarayanan, 

Query : Could you also help with a sample as to how I can set the locale from a valueAccessor please? 
 
We have created the sample with charset UTF-8 for valueAccessor. By using the valueAccessor property we can return the custom data for that column. please refer the below code example, documentation and sample for more information.  


Component.html 
   <ejs-grid #grid [dataSource]='data' allowPaging='true' [pageSettings]='pageSettings'> 
        <e-columns> 
            <e-column field='ShipCountry' headerText='ShipCountry' width='150'  
[valueAccessor]=' valueAccess' ></e-column> 
        </e-columns> 
    </ejs-grid> 



Component.ts 
export class AppComponent { 
    public data: Object[]; 
    public toolbar: string[]; 
    public pageSettings: Object; 
    public refresh: Boolean; 
    @ViewChild('grid') 
    public grid: GridComponent; 

    public ngOnInit(): void { 
        this.data = data; 
        this.pageSettings = { pageCount: 5 }; 
    } 

    valueAccess(field, data, column) { 
// here you can return the custom data 
   return data['ShipCountry']; 

 
If you still facing the issue please get back to us with the following details 
  1. Share the screenshot of the issue.
  2. Share the data you want to show in the grid.
  3. If possible share the sample with the reported issue.
 
Regards, 
Thavasianand S. 


Loader.
Live Chat Icon For mobile
Up arrow icon