how to localize and change text for RadAsyncUpload

1 Answer 281 Views
AsyncUpload Localization
Charles
Top achievements
Rank 1
Iron
Iron
Iron
Charles asked on 22 Jun 2021, 08:23 PM

Hello, I followed the instructions here to create a new localization file for es, and set the text for spanish (es), and modified some of the text for english.

I built the application, and the text I put in for both english and spanish do not show.

I then changed the "build action" for the RadAsyncUpload.es.resx and RadAsyncUpload.resx to "Embedded Resource", which is what I've done with the other resource files included in this project.

Same result.  Neither the english or spanish text shows.

I have the culture set in the code to use the same culture another resource file is using, which is based on the detected culture of the browser:

this.RadAsyncUpload1.Culture = mainPage.Culture;

Even if that wasn't working, the english changes I made should show?

I made sure the satellite es resources dll for the project is deployed as well.

What am I missing?

1 Answer, 1 is accepted

Sort by
0
Attila Antal
Telerik team
answered on 25 Jun 2021, 03:02 PM | edited on 25 Jun 2021, 03:06 PM

Hello Charles,

Try creating a resource file with the original values as well.

For example, add the RadAsyncUpload.resx file:

After that, you can add the one for es-ES and it will work:

Set the Culture

 

<telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" Culture="es-ES"></telerik:RadAsyncUpload>

 

 

Result

 

UPDATE: I forgot to mention, that step 2 in the Global Resource Files mentions that you need to copy the RadAsyncUpload.resx file into the Global_Resources directory.

 

Regards,
Attila Antal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Charles
Top achievements
Rank 1
Iron
Iron
Iron
commented on 28 Jun 2021, 11:35 PM

Thanks. However this didn't work. I'm not sure what I'm doing different from you? I have different text for "select" for both english and spanish, and it still shows "Select". It doesn't matter whether I put the resource files in App_GlobalResources or not. You said "Global_Resources" but the article says "App_GlobalResources"?

Is there a way I can set the text for each field programmatically? ie RadAsynchUpload1.cmdSelect.Text = "Select file to upload";
Attila Antal
Telerik team
commented on 29 Jun 2021, 07:36 AM

My bad, I meant the App_GlobalResources folder. I've shared a screenshot of everything I was doing and it worked. The text I used is coming from Google translate, it might not be the best in the real case scenario, but that doesn't matter, it works with any text.

The default RadAsyncUpload.resx has to be exactly as it is in my example. Same text for everything. That is going to serve as the default values. Then you can create resources for other cultures.

Charles
Top achievements
Rank 1
Iron
Iron
Iron
commented on 29 Jun 2021, 01:56 PM

What if I want to change the text for english? "select" isn't very useful. I'd like to override that text as well as provide text for spanish.
Attila Antal
Telerik team
commented on 29 Jun 2021, 02:48 PM

Sure, you can change that too, but the RadAsyncUplaod.resx must contain all the records (Select, Cancel, Remove, etc...) with the names unchanged and values can be anything you want. 

 

Charles
Top achievements
Rank 1
Iron
Iron
Iron
commented on 29 Jun 2021, 03:00 PM

I did that. It didn't work, either for English or for Spanish.
Charles
Top achievements
Rank 1
Iron
Iron
Iron
commented on 29 Jun 2021, 05:35 PM

I finally got this to work. With more reading I realized the resx files are supposed to reside in the website's App_GlobalResources folder NOT the App_GlobalResources folder of the project. That still wasn't enough to get it to work though. I had to add the parameter to the control in the ascx file LocalizationPath="App_GlobalResources". Only then did it start picking up the strings. Now unfortunately it seems like the button will only grow so much based on the text. But this is progress.
Tags
AsyncUpload Localization
Asked by
Charles
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Attila Antal
Telerik team
Share this question
or