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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Display multiple language entries

Thread ID:

Created:

Updated:

Platform:

Replies:

150134 Dec 22,2019 01:56 AM UTC Dec 24,2019 12:15 PM UTC Angular - EJ 2 3
loading
Tags: Grid
Sathyanarayanan Srinivasan
Asked On December 22, 2019 01:56 AM UTC

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

Thavasianand Sankaranarayanan [Syncfusion]
Replied On 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. 


Sathyanarayanan Srinivasan
Replied On 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

Thavasianand Sankaranarayanan [Syncfusion]
Replied On 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. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon