Gidpanel Language UI (localization)

  1. #1

    Gridpanel Language UI (localization)

    Hi

    Please someone know how change the labels of the UI (User Interface) that come with the control gridpanel?

    for example change the label "Sort Ascending" for this other label "Ordenar ascendentemente"

    I need this because the users for the aplication don't know english language they are spanish people

    thank you for the help :cool:
    Last edited by hernanjls; Oct 01, 2010 at 8:13 PM. Reason: error
  2. #2

    Gridpanel Language UI (localization)

    Hi,

    I used Global localization for this purpose.Add App_GlobalResources folder.Add resource file(eg:Test.aspx.resx) for english.Give the text and key value.Add other resource file(eg:Test.aspx.es-ES.resx) for spanish.In your Gridpanel page.if we will change the page culture automatically sort ascending will come into spanish.No need to put that value in resource file

    protected void Page_Init(object sender, EventArgs e)
            {
                Page.Culture = "es-ES" ;     
                Page.UICulture ="es-ES"  ;      
                
            }
    or put into page load
    protected void Page_Load(object sender, EventArgs e)
            {
                Page.Culture = "es-ES" ;     
                Page.UICulture ="es-ES"  ;      
                
            }


    In my gridpanel i had to display Username,Firstname and Lastname as columns

    protected void Page_PreRender()
            {
                this.GridPanel1.ColumnModel.SetColumnHeader(0, GetGlobalResourceObject("Test.aspx", "UserName").ToString());
                this.GridPanel1.ColumnModel.SetColumnHeader(1, GetGlobalResourceObject("Test.aspx", "FirstName").ToString());
               this.GridPanel1.ColumnModel.SetColumnHeader(2, GetGlobalResourceObject("Test.aspx", "LastName").ToString());
            }

    I think this code will help you.





    Quote Originally Posted by hernanjls View Post
    Hi

    Please someone know how change the labels of the UI (User Interface) that come with the control gridpanel?

    for example change the label "Sort Ascending" for this other label "Ordenar ascendentemente"

    I need this because the users for the aplication don't know english language they are spanish people

    thank you for the help :cool:
  3. #3
    Hi and thanks for the reply,

    But I am interested in change the 'default labels' of the grid, not load the labels for the columns dynamicly

    For example you have labels with the following texts

    'Sort Ascending'
    'Sort Descending'

    this labels appears associated with the custom columns of the grid (in the header of each the column when you click over this) for the commands for ordering

    Now I need change these texts for others in spanish or other language, in general the same for the rest of the labels associated for any control.

    Thank you for the help









    Quote Originally Posted by NishaLijo View Post
    Hi,

    I used Global localization for this purpose.Add App_GlobalResources folder.Add resource file(eg:Test.aspx.resx) for english.Give the text and key value.Add other resource file(eg:Test.aspx.es-ES.resx) for spanish.In your Gridpanel page.if we will change the page culture automatically sort ascending will come into spanish.No need to put that value in resource file

    protected void Page_Init(object sender, EventArgs e)
            {
                Page.Culture = "es-ES" ;     
                Page.UICulture ="es-ES"  ;      
                
            }
    or put into page load
    protected void Page_Load(object sender, EventArgs e)
            {
                Page.Culture = "es-ES" ;     
                Page.UICulture ="es-ES"  ;      
                
            }


    In my gridpanel i had to display Username,Firstname and Lastname as columns

    protected void Page_PreRender()
            {
                this.GridPanel1.ColumnModel.SetColumnHeader(0, GetGlobalResourceObject("Test.aspx", "UserName").ToString());
                this.GridPanel1.ColumnModel.SetColumnHeader(1, GetGlobalResourceObject("Test.aspx", "FirstName").ToString());
               this.GridPanel1.ColumnModel.SetColumnHeader(2, GetGlobalResourceObject("Test.aspx", "LastName").ToString());
            }

    I think this code will help you.
  4. #4
    Hi,

    Please use SortAscText and SortDescText properties of GridView class
    Vladimir Shcheglov
    Sr. Developer

Similar Threads

  1. Multi-language with Ext.Net
    By csharpdev in forum Examples and Extras
    Replies: 3
    Last Post: Jun 09, 2011, 9:09 AM
  2. Replies: 0
    Last Post: Feb 14, 2011, 9:41 AM
  3. Replies: 2
    Last Post: Dec 03, 2010, 4:30 PM
  4. Multiple language
    By huynd in forum 1.x Help
    Replies: 1
    Last Post: Jul 26, 2010, 4:48 AM
  5. Multi Language
    By phamtuananh20052006 in forum 1.x Help
    Replies: 2
    Last Post: Jun 01, 2009, 11:44 PM

Tags for this Thread

Posting Permissions