jQWidgets Forums
jQuery UI Widgets › Forums › Grid › jqxgrid localization can be changed only once and not anymore times?!
Tagged: jqxgrid, localization
This topic contains 2 replies, has 2 voices, and was last updated by homam 12 years, 2 months ago.
-
Author
-
February 23, 2013 at 8:10 am jqxgrid localization can be changed only once and not anymore times?! #15753
Hi i have a jqxgrid and i want to change its localization with a click on a div here is my code:
$(function(){
$('body').on('click', '.lang-select', function(){
if($(this).data('lang') == 'pe'){
$(this).parent('div').append('<div class="lang-select" data-lang="en">English</div>');
$(this).remove();
$('body').find(".file-confirmation-content").jqxGrid({
columns: [
{ text: 'شناسه فایل', datafield: 'fileid', width: 40, cellsalign: 'center', align: 'center', cellsrenderer: rowfileid },
{ text: 'نام فایل', datafield: 'filename', cellsalign: 'center', align: 'center', width: 100, cellsrenderer: rowfilename },
{ text: 'عنوان فایل', datafield: 'title', cellsalign: 'center', align: 'center', width: 100 },
{ text: 'کاربران', width: 'auto', cellsalign: 'left', align: 'center', cellsrenderer: users }
],
});
}
if($(this).data('lang') == 'en'){
$(this).parent('div').append('<div class="lang-select" data-lang="pe">فارسی</div>');
$(this).remove();
$('body').find(".file-confirmation-content").jqxGrid({
columns: [
{ text: 'File id', datafield: 'fileid', width: 40, cellsalign: 'center', align: 'center', cellsrenderer: rowfileid },
{ text: 'File Name', datafield: 'filename', cellsalign: 'center', align: 'center', width: 100, cellsrenderer: rowfilename },
{ text: 'File Title', datafield: 'title', cellsalign: 'center', align: 'center', width: 100 },
{ text: 'Users', width: 'auto', cellsalign: 'left', align: 'center', cellsrenderer: users }
],
});
} }); })
First i initialize my grid, on click on (‘.lang-select’) the localization will change once but not anymore
is there any work around?
February 23, 2013 at 12:08 pm jqxgrid localization can be changed only once and not anymore times?! #15762Hi homam,
To change the Grid localization, see the jquery-grid-localization.htm. It does not matter how many times you change it.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comFebruary 24, 2013 at 8:53 am jqxgrid localization can be changed only once and not anymore times?! #15769Hi Peter
thanks so much for your response.
i have another problem.
i want to change my table headers text as well as other localizable parts. is it ppossible or not?thanks homam
-
AuthorPosts
You must be logged in to reply to this topic.