Dear Infragistics,
Our customers are Dutch. When you hold the cursor on the "Expand Row" icon it'll read in the tooltip: "Expand Row".
Can I translate this to Dutch and show it in Dutch to the enduser in the tooltip?
Hello DannyvdK,
Our Ignite UI controls are localized to 6 languages other than English. To localize to another language, you can follow the steps listed in this topic. It provides a walkthrough, in which you can subsitute "-es" with "-nl" for Dutch. Instead of localizing the paging, you'd be translating "expandTooltip" and "collapseTooltip" in the infragistics.ui.grid-nl.js file. You can translate as many or as few strings as you'd like.
Please let me know if you have any questions about this approach.
Elizabeth AlbertLocalization Engineer
Hello Elizabeth,
Thank you very much for replying.
I have followed the topic you linked.
I found the strings that I want to change in the infragistics.ui.grid.framework.js file (so not in the infragistics.ui.grid.js). I changed the expandTooltip and the collapseTooltip and made a infragistics.ui.grid.framework-nl.js file.
But... Now I want to reference my new nl js file, but in my _Layout.cshtml I only reference infragistics.js and infragistics.loader.js, like so:
<script src="@Url.Content("~/Scripts/IG/infragistics.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/IG/infragistics.loader.js")" type="text/javascript"></script>
So, where do I set the reference to my new -nl.js file?
Thank you very much in advance for answering.
Kind regards,
Danny
p.s.: Sorry for the late reply, I was on vacation.
Hello Danny,
The strings in the infragistics.ui.grid-en.js file are combined into the infragistics.ui.grid.framework.js file during our build process. That is why you found them there. However, they should also be in the infragistics.ui.grid-??.js files, where ?? is any 2 letter culture code that we support. The -en.js file is not included in the installation package because it is combined into the grid script. I have attached it for your convenience.
Please follow these steps.
1. Localize any strings you would like in the infragistics.ui.grid-en.js file.
2. Rename the file to infragistics.ui.grid-nl.js.
3. Put the file in the /js/modules/i18n folder. You should see this folder in your installation package.
4. If you are not using the loader, in your .cshtml file, include a script reference *above* the other two. If this file is not referenced (defining the locale) before the other .js files are loaded, then it will default to English.<script src="@Url.Content("[path to where you put the file in step 3]")" type="text/javascript"></script>
5. When using the loader, you can specify the locale. For more information, please see the Using Infragistics Loader topic.
Please let me know if you have any other questions.
When using the loader and specifying the locale, it will want some additional -nl.js files. You could copy and paste some of the other locale files and rename them.
The alternative I found was to follow step 4 instead of step 5, even when using the loader. Just make sure to reference the custom locale file before the loader.
Your paths will be slightly different than mine, but here is an example.
<head> <title></title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js" type="text/javascript"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.js" type="text/javascript"></script>
<!-- Reference to custom localization file --> <script src="../IgniteUI_20131_WithSamplesAndHelp_NoInstaller/js/modules/i18n/infragistics.ui.grid-nl.js" type="text/javascript"></script> <!-- Use the loader --> <script src="../IgniteUI_20131_WithSamplesAndHelp_NoInstaller/js/infragistics.loader.js" type="text/javascript"></script> </head>
... (inside the body script)
$.ig.loader({ scriptPath: '../IgniteUI_20131_WithSamplesAndHelp_NoInstaller/js/', cssPath: '../IgniteUI_20131_WithSamplesAndHelp_NoInstaller/css/', resources: 'igHierarchicalGrid.*', });
Dear Elizabeth,
Thanks for the help so far. What I've done:
- Localized infragistics.ui.grid.js on my system. The weird thing is, I only found infragistics.ui.grid-jp.js, infragistics.ui.grid-ru.js and infragistics.ui.grid-bg.js (I didn't find infragistics.ui.grid.js on it's own).
- But didn't matter. I used infragistics.ui.grid-bg.js, renamed it to infragistics.ui.grid-nl.js and almost translated all the strings I need to translate.
- Then I reference the custom localization js file like in your example before referencing any other Infragistics js files. The only difference is, I don't need to use $ig.loader, it works just by referencing it.
Ok, last question. Like I said, I translated almost everything I needed to translate. The paging buttons at the right-bottomcorner still say "Previous" and "Next" and I can't find them, where can I translate those strings? Plus the tooltip at the icon for the dropdown of the number of records per page still says "Show list". I need to translate this too. Where can I find it?
Thanks again for the quick reply.
Oh my gosh! I'm sorry Elizabeth. Apparantly I set the labels for those two buttons in Razor code! Forgot that was possible and I'm not sure why I'm doing that (probably from an example on Infragistic's site. But I removed the instruction and it picked up the translated strings. Sorry for bothering you so much.
Thank you, take care!
Grts,
Based on what you've told me so far, it sounds like you are using version 12.1. I tried to change the "prev" and "next" button text using version 12.1.20121.2202, and it worked as expected.
The default English text for these buttons are "prev" and "next". If "Previous" and "Next" are showing instead, it sounds like it is customized in css. Could you please search your project for "Previous" and "Next", to see if they're set somewhere in css? I like using Notepad++'s "Find in Files" tool to search an entire folder, with the option to specify a file filter (ex. "*.css"). I just searched the installation package from v12.1 for "Previous" and it's not something we're setting to a custom value.
Please let me know if this solves the issue. If it doesn't, could you please let me know the version number you're using, and if you are using any themes?
Still very gratefull for all your help so far. Unfortunatly not finished here, if you could please help me some more...
I found the buttonTitle key in the .editors-**.js file, changed it, and it works. So thats fine.
But the 'Previous' and 'Next' won't change. Apparantly I did find them yesterday and changed them. But the labels won't change. Do you have any idea why that is? I did change the tooltips though, they all work fine.
p.s.: I checked in Firebug the infragistics.ui.grid-nl.js file. And I see the changed values. But on my website the buttons still say "Previous" and "Next" in English. Tooltips work fine though. Pretty weird.
There is no infragistics.ui.grid.js. The infragistics.ui.grid-**.js files are localization files, which take the localizable content from multiple grid .js files in the modules folder and put it all together in one file. What you did was correct.
For the "prev" and "next" paging buttons, you can find these strings in the infragistics.ui.grid-**.js file. The keys are "nextPageLabelText" and "prevPageLabelText". You can also change the tooltips "prevPageTooltip", "nextPageTooltip", "firstPageTooltip", "lastPageTooltip".
The dropdown button tooltip is set in the infragistics.ui.editors-**.js file. The key is "buttonTitle". You can do the same thing for this file that you did for the grid file. Copy one of the other locale files, rename it to infragistics.ui.editors-nl.js, translate the content, and reference it in the .cshtml file.
Let me know if there is anything else!