Community & Support
Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Spell > Hot to use es-ES language
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Not answered Hot to use es-ES language

Feed from this thread
  • Posted on May 15, 2007 (permalink)

    hi,all

    Os-Windows XP Prof
    Broswer IE7
    C#.Net And ASP.NET

        In my application im using radspell v2.6.1.i have es-ES.dtf in my RadControls/Spell/TDF directory. How can I use the es-ES dictionary in my radspell?. Do I need the es-ES.xml and put it under the es-ES folder?

    Thanks,
    Arun

  • Petya Petya admin's avatar

    Posted on May 15, 2007 (permalink)

    Hello Arun,

    You need to set RadSpell's property dictionarylanguage="es-ES" to start spellchecking by using es-ES.tdf. If you would also like to have the localization of RadSpell in es-ES, i.e. all text such as button titles, etc to appear in es-ES on your page, then you need to create a folder es-ES under RadControls/Spell/Localization and place a SpellCheck.xml file there including the localized strings in the desired language. Then you need to set the RadSpell's property: language="es-es". This topic might help you:

    http://www.telerik.com/help/radspell/v3%5FNet2/?Localization.html

    As an example:

    <asp:textbox id="textBox1" runat="server"></asp:textbox>
    <rads:radspell id="RadSpell1" runat="server" language="es-ES" controltocheck="textBox1" dictionarylanguage="es-ES">

    Kind regards,
    Petya
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

  • Vince avatar

    Posted on Nov 29, 2007 (permalink)

    I have some minor problems with using the Localization for es-ES.  If I don't specify the Skin attribute on the RadSpell control, then localization works fine.  I set the Language attribute in my code file like the following.

    Spell.Language = "es-ES"

    I have a RadSpell.xml file in the es-ES localization folder.  The button gets updated with the Spanish words.

    However, the Spanish translation that we used are bigger than the size of the button.  So when I specify a custom skin for the RadSpell control to use, I was able to make the button wider but the localization stopped working.  Now it is only in English regardless of how I set the Language attribute in the code file.

    I am coding with Visual Studio 2005 C# ASP.NET 2.0 on a Windows XP.  I have a virtual directory on the root of my application that points to the RadControls folder on the root of the IIS server.

    Please let me know how I can get localization to work.

    Thank you very much,
    Vince

  • Rumen Rumen admin's avatar

    Posted on Nov 30, 2007 (permalink)

    Hi Vince,

    To fix the problem set the Skin property of RadSpell to the used Skin name, e.g.

    <asp:textbox id="textBox1" runat="server"></asp:textbox>
    <rads:radspell id="RadSpell1" runat="server" language="es-ES" Skin="Default" controltocheck="textBox1" dictionarylanguage="es-ES" />

    The next step is to open the \RadControls\Spell\Skins\Default\RadSpell.css file and modify the .RadSpell_Default_Ext.spButton class as follows:

    /*button*/
    .RadSpell_Default_Ext.spButton
    {
        border:0;
        width: auto;
        text-align:center;
        color:#fff;
        cursor:pointer;
        background: #494949 url(Img/spellButtonCombined.gif) repeat-x;
    }

    Finally replace the RadControls\Spell\Skins\Default\Img\spellButtonCombined.gif image with the attached one.


    Anoter suggestion is to display ellipsis after the first Spanish word you can do that with the following css modification:

    /*button*/
    .RadSpell_Default_Ext.spButton
    {
        width: 67px;
        overflow: hidden;
        letter-spacing: nowrap;
        text-overflow: ellipsis;
        border:0;
        text-align:center;
        color:#fff;
        cursor:pointer;
        background: #494949 url(Img/spellButtonCombined.gif) 0 0 no-repeat;
    }

    Kind regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
    Attached files

  • Vince avatar

    Posted on Nov 30, 2007 (permalink)

    Thank you for the quick response.  I tried your suggestion and it worked much better.  However, since your example is setting the Language attribute of RadSpell to Spanish, no matter what Culture I set, it displays only the Spanish localization.

    Let me give you a little more background so you can understand the situation that I am in.

    We have a single ASPX page that we currently have a Multi-line Textbox that we want to check for spelling errors.  We support both Spanish and English on the same page.  All the other controls are using resource files in order to switch out the language and support localization.  On this page we have a Textbox that is dynamically generated inside a DataList.  So I include the RadSpell control in the DataList as well.  When the ItemDataBound event gets fired, I am trying to set the Language attribute of RadSpell to be either "en-US" or "es-ES" depending on what Culture the user is in.  But when I do it this way, the wordings on the button for RadSpell does not change according to the Language attribute.  If I hard code "es-ES" on the APSX page in the RadSpell control, then it shows the Spanish wordings on the button.  But it won't change to anything else after that.  It stayed Spanish no matter what Language setting I set in the code behind.

    Here's a sample of the code that does not work for me:

    <!-- Part of ASPX Page --> 
    <ASP:DATALIST id="DataList1" runat="server" showfooter="False" showheader="False" repeatcolumns="1" cellspacing="5">  
        <ITEMTEMPLATE> 
            <ASP:TEXTBOX id="txtOption" runat="server"></ASP:TEXTBOX> 
            <radS:RadSpell ID="Spell" Runat="server" SupportedLanguages="en-US,English,es-ES,Español" Skin="Default" /> 
        </ITEMTEMPLATE> 
    </ASP:DATALIST> 
     

     

    private void DataList1_ItemDataBound(object sender, System.Web.UI.WebControls.DataListItemEventArgs e)  
    {  
        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)  
        {  
            RadSpell Spell = (RadSpell)e.Item.FindControl("Spell");  
            if (System.Threading.Thread.CurrentThread.CurrentCulture.ToString().ToUpper() == "ES-MX")  
            {  
                Spell.Language = "es-ES";  
                Spell.DictionaryLanguage = "es-ES";  
            }  
            else 
            {  
                Spell.Language = "en-US";  
                Spell.DictionaryLanguage = "en-US";  
            }  
        }  
    }  
     

    So, when the above code runs, the localization stays English.  If I specify Language="es-ES" in the APSX page itself, then it stays Spanish.  I can't seem to get the code behind to be able to set it and make localization work.

    Now, if I do NOT set the Skin attribute, then everything works fine but it defaults to the Default skin it uses WebResources for all the styles so I can't control how wide the button will be.  But the localization works fine with both English and Spanish when I set the language tag like I did with the above C# code.

    I hope I have not totally confused you with this post but it would be a tremendous help if I can get this to work correctly.

    Thank you very much for your help and time and hoping to hear back from you again soon.

    ~Vince

  • Rumen Rumen admin's avatar

    Posted on Dec 7, 2007 (permalink)

    Hi Vince,

    We saw that you create the spellchecker in the itemtemplate databound. We believe that when you change the page language you do not databind the datalist again, which means that the spellchecker is not updated.

    Could you please try to databind the page when you are changing the page language? This should fix the problem.

    Best regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

  • Vince avatar

    Posted on Dec 10, 2007 (permalink)

    When we switch the language, we are actually doing a Response.Redirect so it is already DataBinding.  The whole page gets loaded again.  Here's some code that we used to change the language on our end.

    protected void btnSpanish_Click(object sender, EventArgs e)  
    {  
     
      string url = Request.Url.ToString();  
      string culture = "es-MX";  
      RedirectToURL(url, culture);  

    private void RedirectToURL(string url, string culture)  
    {  
      url = EncryptionUtil.UrlEncodeQueryString(url);  
     
      string appendCultureInfo;  
     
      if (Request.QueryString.Count > 0)  
      {  
            appendCultureInfo = "&culture=" + culture;  
      }  
      else 
      {  
            appendCultureInfo = "?culture=" + culture;  
      }  
     
      Response.Redirect(FormatURL(url) + appendCultureInfo);  

    As you can see, we are doing a total page load because we are doing a Response.Redirect back to the page that we are currently on with the new culture being set.  When I debug, I step through the code and the DataBind is being run again as it sets the Language tag to be "es-ES".

    Please let me know if there's anything else I should try.

    Thank you,
    Vince

  • Rumen Rumen admin's avatar

    Posted on Dec 15, 2007 (permalink)

    Hello Vince,

    Unfortunately, the provided information is not enough the determine what is causing the problem.

    We will be grateful if you open a support ticket and send a sample working project along with the bin and RadControls folders that demonstrates the problem. We will test the project, examine your code and try to provide a solution.


    Best regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

  • Olivier avatar

    Posted on Oct 12, 2010 (permalink)

    Hello,
    i have been looking for the spanish dictionnary file for RadSpell (a tdf file i guess). Only French German and english are included by default, and i cannot find any way to download additional tdf files from your site.
    Thanks for your help.

    Olivier

  • Rumen Rumen admin's avatar

    Posted on Oct 12, 2010 (permalink)

    Hi Olivier,

    You can download the requested Spanish dictionary from the following forum sticky note: RadSpell Dictionaries.

    Best regards,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Spell > Hot to use es-ES language