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.
Unfortunately, activation email could not send to your email. Please try again.

Text in another language

Thread ID:

Created:

Updated:

Platform:

Replies:

133004 Oct 3,2017 12:57 PM Oct 9,2017 01:43 AM PHP 5
loading
Tags: Grid
Eduardo Meza
Asked On October 3, 2017 12:57 PM

Hello.

How can I change text to another language, for example to spanish.

Thanks in advance.



Mani Sankar Durai [Syncfusion]
Replied On October 4, 2017 07:11 AM

Hi Eduardo, 

Thanks for contacting Syncfusion support. 

We have analyzed your query and we found that you would like to perform localization in grid. We can achieve your requirement using locale property in grid.  
Refer the code example 
... 
<link rel='nofollow' href="http://cdn.syncfusion.com/15.3.0.33/js/web/bootstrap-theme/ej.web.all.min.css" rel="stylesheet" /> 
... 
    <script src="https://cdn.syncfusion.com/15.3.0.33/js/web/ej.web.all.min.js"></script> 
    <script src="i18n/ej.culture.ar-AE.min.js"></script>   //locale file for ar-AE. 
    <script src="l10n/ej.localetexts.ar-AE.min.js"></script> 
 
 
<div class="cols-sample-area"> 
        <?php 
 
        $Json = json_decode(file_get_contents("data.json"), true); 
        $col1 = new EJ\Grid\Column(); 
        ... 
       $gridColumns = array($col1,$col2,$col3,$col4,$col5); 
        $grid =  new EJ\Grid("Grid"); 
        $column=new EJ\Grid\Column(); 
        echo $grid -> locale("ar-AE") -> dataSource($Json)->allowPaging(true)->allowgrouping(true)->columns($gridColumns)->render(); 
        ?> 
    </div> 

Refer the documentation link. 
Also we can get the corresponding culture file from the following location. 
 
Note: When using localization it is must to refer the corresponding locale script file after ej.web.all.min.js file. 
 
Please let us know if you need further assistance 
 
Regards, 
Manisankar Durai. 



Eduardo Meza
Replied On October 4, 2017 10:18 AM

But in PHP the reference is 

<?php

require_once '../EJ/AutoLoad.php';

?>

and in the example I don't find where js files are referenced.


Saravanan Arunachalam [Syncfusion]
Replied On October 5, 2017 03:40 AM

Hi Eduardo, 
By default, the AutoLoad.php file is automatically retrieves the required source class file to render the specified controls and the navigation/navigation.php file has scriptsection.php file which include the required script files to render the syncfusion controls. So, we suggest you to refer the required script files for locale in the scriptsection.php file which is located in the below directory. 
 xxx\navigation\scriptsection.php 
Regards, 
Saravanan A. 
 


Eduardo Meza
Replied On October 6, 2017 06:01 PM

Thanks for your help.

Have a nice day.


Saravanan Arunachalam [Syncfusion]
Replied On October 9, 2017 01:43 AM

Hi Eduardo,  
Thanks for your update.            
We are happy that the provided information helped you. 
Regards, 
Saravanan A. 


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.

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.

;