K2 forms – Bilingual

Capture

Hi,

This post is more focused on making your K2 forms bilingual Arabic language sup portability . Though K2 starting shipping K2 language pack, as of now only 11 languages are included and officially supported by K2. Check out does K2 language pack supports your language on the below.

K2 Languages Sup portability

Since Arabic is not supported yet on K2 language pack and lot of our customers wanted their K2 application to be supported on Arabic language, we have come up with workaround how to make K2 forms ARABAISED.

Solution Description

The workaround solution requires installation of two custom control available on K2 community.

  • Set Language control

– Set language control will be used to translate K2 form controls texts on the client side. To know more about set language please visit the Set Language link.

  • Uri Info Control

– Uri Info control is used to capture K2 form URL on run-time. To know more about the control please visit the Uri Info Control

  • Create new web application for Arabic Site

Copy K2 Smartforms Runtime site from the K2 blackpearl installed folder (program files\K2   blackpearl\) and paste inside the K2 blackpearl folder itself and rename it to Arabic Runtime site. Once the Folder is copied and renamed. Go to IIS and create an application on K2 site and select the physical path as Arabic Runtime Site.

IIS

Once the application is created, please go the Arabic Runtime site and open the Default resource file present inside the App_Globalresources folder and set the direction to RTL.

Update global resource files to Arabic

To let error messages, warnings, required field values to be rendered in Arabic language, we need to update the resource files of the Arabic runtime site into Arabic language;

Below set of resource files need to be update in order to localize warnings, error messages;

  • Runtime.resx
  • RuntimeMessage.resx
  • Default.resx
  • MessageBox.resx
  • TaskControl.resx

Setting Realm for Arabic Site

Once new Arabic site is created under the existing K2 site, we need to set up new realm response uri details; To set up Realm uri follow below steps;

  • Open K2 Designer and navigate to System category
  • Under System category, navigate into Security under Management category as shown below

IIS

  • Run the form Manage Site Realms, it appears as shown below;

IIS

  • Realm entries would be already exist for the English site (Runtime site)
  • Click on New button to add new Realm entry, a window will open up as shown below;

IIS

URI – add Arabic site URL, for example, I have created Arabic web application under K2 site, so my URI is in the below format

Format:             [https/http]:// [host name]/Arabic/

Example:          http://k2.denallix.com/Arabic/

Reply URI – add Arabic application virtual directory name

Example:          Arabic is the web application name, so it would be as /Arabic/

Home Realm – You can leave this field as empty, it should affect

Linked Issuers – Please select the type of issuers, based on the authentication mode we select the checkbox.

  • Once all the details are filled, say OK, new realm details for Arabic site is created and linked.

Now you are successfully configured Arabic site for K2 forms to be rendered in Arabic language.

Define Xml resource file for each form using Language Set tool.

Set language custom control facilitates K2 form translator tool which accepts form URL and translates all contents to any language. To know more about K2 form translator please follow the document available in the Set language custom control solution.

Once the .xml please provide xml resource file name in the Set language control properties.

Upon form initialized rule, now set the SET LANGUAGE control value to Arabic language name as shown below;

IIS

Capture

Result

Now run the form pointing on Arabic site with below URL format;

[https/https]://[domain]/Arabic/Runtime/Form/[FormName]

IIS

The above workaround is a custom solution and hence you cannot claim any K2 product sup portability. Should have any queries please write your comments.

 


Leave a comment