This is a migrated thread and some comments may be shown as answers.

[Solved] Localize Grid

4 Answers 135 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Pablo
Top achievements
Rank 1
Pablo asked on 28 Jan 2010, 05:32 PM
Hi,
We are looking for a way to localize Grid texts, such as filter texts and grid footer texts. For example, the "Displaying Rows" text.

We need to develop a culture aware application.

Could you please give us some advice?

Pablo.

4 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 29 Jan 2010, 08:47 AM
Hello Pablo,

The grid is currently not easily localizable without modifying the source code. We have this logged as a feature suggestion and you can vote for it.

Regards,
Atanas Korchev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Filip Ekberg
Top achievements
Rank 1
answered on 03 Feb 2010, 09:54 AM
Check out the JavaScript-file ( telerik.grid.min.js ) and ( telerik.grid.filtering.min.js ) these two have all the text that is staticly defined for the Grid. You could easily replace the Javascript-file with a Server-side page that fetches the correct cultural text and replaces the default strings.

It's a little Hacky but it works.

And when you generate the columns you can do somewhat the same thing.

Hope this helps

// Filip
0
Pablo
Top achievements
Rank 1
answered on 03 Feb 2010, 10:27 AM
Hi Filip,

We tried to create a localized version of the js, and load through ScriptManager localization features, but i didn't manage to get it work.
How can i replace it through a server-side page? Could you give me a brief sample or link?

It would be a great help for us.

Thanks in advance.
0
Filip Ekberg
Top achievements
Rank 1
answered on 03 Feb 2010, 12:06 PM
Hi,

There's a ".ScriptFilesPath()" method on the Grid you can use to set the Script Files Path, however this will look for all the scripts in this folder. But if you combind this with the ".ScriptFileNames()" you can acheive the same result. However it is a Virtual Path so you might need to set up a Routing for the specific grid-javascript so that it catches the name.

Hope this helps!

// Filip
Tags
Grid
Asked by
Pablo
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Filip Ekberg
Top achievements
Rank 1
Pablo
Top achievements
Rank 1
Share this question
or