When you are building a Portal using Silver Essence, you can make use of the translations that are generated from the Essence Core. This way you can be sure that all labels will be translated exactly as they are in the Essence Portal itself. But when you are creating a public website (where there is no user login), you cannot make use of these translations. Also, you might want to have translated versions of other texts that are not associated with the Essence configuration. To give you a Translation Tool that can be used as a stand-alone engine, we are introducing Ikat.
You can use Ikat within any web development project where you use asp.net. That could be a Essence Portal, but you can also use Ikat for a public website. Ikat is completely open source so you can also use it for non-Essence related web development.
With Ikat you get a Maintenance Page where you can specify which languages you want to use. From there you can start adding the Terms you need. Each Term has a Referer. A recognizable name that you can use to get the translation you need. Each Term can be translated into any of the languages as you have defined.
Of course the Maintenance Page is password protected. You can set a password in the Ikat.aspx.cs. Anyone with the password can access the page and there is no need to have an Essence Portal Login. That way you can share the login also with the Customer or a translator who can do the work for you.
The Basic use of Ikat
To start using Ikat in your Pages and Controls, you simply need to add the Control Mobrol.ascx in any Page or Control you need to use it. This gives you access to all the functions you need. The easiest way to get a translation is using the Mobrol.Get function:
Label lblBullet01.Text = Mobrol.Get("bullet01", languageCode);
The first parameter is the Referer you want to get the translation from. The second one is the Code for the Language you want to use. We recommend that you use a private string for this. That way you can set the languageCode in the Page Load, for example by reading it from the Request.QueryString or by setting it from Code Behind.
You can also pass an empty string as Language Code and then it will return the default language. We recommend to use English as your default language.
Advanced use of Ikat
To give you more flexibility, you can also use the Mobrol.Texter. With this function you have a number of parameters available. Here's how to use them:
- target (mandatory)
This is the Control to which you want to apply the translation. This can be a Label, Button, LinkButton, TextBox or CheckBox.
- referer (mandatory)
The Referer for which you want the translation
The Code of the Language you want to use. If you leave out this parameter, the default text will be used.
Here you can specify if you want to have the Referer added as a ToolTip. This can come in handy for the person doing the translations because they can hover over a text in the Page and then they can see which Referer is responsible and should be translated.
This boolean one might come in handy if there are no translations yet. If the Referer you specify as the first parameter does not exist, it will be automatically created. That way, when you are done at the end of the day, all the necessary Referers will be added and the translator can do the translations.
By default the translation will be assigned to the Text attribute of the control. If you set this boolean to true, it will instead assign it to the placeholder attribute. Since only the TextBox has that option, it will only work when is is applied to a TextBox.
- Mobrol.Texter(lblBullet01, "bullet01", languageCode, showHint);
This one will assign the translation to lblBullet01.Text for the specified languageCode. If showHint is true, the translation is also assigned to the lblBullet01.ToolTip.
- Mobrol.Texter(lblWebshopIntro, "webshopIntro", languageCode, showHint, true);
This one does the same, but it also created the webshopIntro Refererer if it is not found in the translations.
- Mobrol.Texter(tbNewsletter, "signupNewsLetter", languageCode, showHint, true, true);
Here the Control used is a TextBox and the Texter will add the placeholder attribute and assigns the translation to it.
Ikat is the name of an ancient Indonesian weaving technique where dyed yarns are woven into a fabric. The final result of the dyeing process cannot be seen from the yarns themselves. Only when woven, the fabric will reveal the final pattern. Our Translation System behaves the same. First you do the Terms and Translations and then you "weave" them into your Pages and Controls. Hence the name Ikat.
Mobrol is the indonesian word for chatter or an informal conversation. Since no login is required to do the translations, we thought this to be an appropriate name for the main Control.
If you want to try out Ikat or use it in one of your projects, you can download it from our website. Unzip the file to a folder and run the Ikat.sln to open the solution. If you run the solution, the web.config will automatically be created.
You can also copy the folder into an existing website. In that case, open the solution for that website and run the Ikat.aspx to start translating.
That's all there is to it. If you have any questions or suggestions, feel free to contact us at email@example.com.