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

Text in another language

Hello.

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

Thanks in advance.



5 Replies

MS Mani Sankar Durai Syncfusion Team October 4, 2017 06: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. 




EM Eduardo Meza October 4, 2017 09: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.



SA Saravanan Arunachalam Syncfusion Team October 5, 2017 02: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. 
 xxxavigation\scriptsection.php 
Regards, 
Saravanan A. 
 



EM Eduardo Meza October 6, 2017 05:01 PM

Thanks for your help.

Have a nice day.



SA Saravanan Arunachalam Syncfusion Team October 9, 2017 12:43 AM

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


Loader.
Live Chat Icon For mobile
Up arrow icon