Adding a language 3.0

9:03 PM
Adding a language 3.0 - to showcase

I have been asked a few times recently as add a new language 3.0 to showcase. So, I thought I better write d a blog post about it.

The process is very similar to storefront 2.x. For the Unified Receiver UI place the location of the language files, and to load the JavaScript code, these files are different. Here are the details. Add

a language pack

A new language pack consists of a cultural definition file, a string bundle file and a custom string bundle file.

culture definition file

The format of the culture definition file is:

 (function ($) {$ .globalization.availableCulture ( "", {name: "" english name: "" native name: "" string bundle: "" custom string bundle: ""});}) (jQuery); 

For example, for the unified receiver UI looks a culture file for Polish as:

 (function ($) {$ .globalization.availableCulture ( "pl", {name: " pl "english name:" Polish "native name:" polski "string bundle" custom / wrstrings.pl.js "custom string bundle" custom / custom.strings.pl.js "});}) (jQuery); 

For the classic UI culture file looks like this, which are not of storefront 2.x.

 (function ($) {$ .globalization.availableCulture ( "pl", {name is changed: "pl", english name: "Polish" native name: "polski" string bundle: "contrib / wrstrings. pl.js "custom string bundle:" contrib / custom.strings.pl.js "});}) (JQuery); 

This should be saved folders for Unified Receiver user interface and as culture.pl.js and in the custom contrib folder for the Classic UI.

string bundle files

a string bundle file defines a set of name-value pairs. You can copy an existing string bundle file and the language code (for example, 'en') with the new language code (eg 'pl') replace and replace all string values ​​with translated. Save your new language bundle file as wrstrings. Js , for example, wrstrings.pl.js .

for the unified receiver UI, the integrated string bundle file is under the folder receiver js Location . For example, the path for the English string bundle file is something like receiver js Location en ctxs.strings_BA0A6F9FF8511CBD.js . The random string in the file name generated to recipients for website creation time and is different for each site. Your new language pack file, for example, wrstrings.pl.js are, should folder in the custom .

are placed for the Classic UI, the integrated string bundle file is under the folder Scripts . For example, the path for the English string bundle file Scripts de ctxs.wrstrings.js . Your new language pack file, for example, wrstrings.pl.js should be stored in the contrib folder.

You also need to create a custom string file for the new language. You can copy a user-defined string for a built-in language (eg English), change the language code and replace the string values ​​with translated. For the Unified Receiver UI this is custom strings. Js , for example, custom strings.en.js for English. For the Classic UI, which is contrib custom.strings. Js , for example, contrib custom.strings.en.js for English. The custom string file as custom.strings should be saved. Js , for example, custom.strings.pl.js for the Polish and the custom folder for Unified Receiver UI and in contrib folder for the Classic UI placed.

After you create the language pack Loading

the language pack, you need to load Receiver for Web adapt.

for the unified receiver UI this is done by adding the following code script.js in the custom folder

 $ ctxsAjax ( {datatype :. 'script', uRL: 'custom / culture.pl.js' async: false}); 

for the Classic UI, this by is the following code custom.script.js in contrib folder performed:

 $ (document ) .ready (function () {CTXS.Localization.getScript ( "contrib / culture.pl.js");}); 

Adding Language Resources Authentication Service

The user interface for the application form is provided by the Storefront authentication service. these strings localization requires to create three additional resource files. In continuation with Polish (language code "PL") as an example:

in Windows Explorer, open the folder . C: inetpub wwwroot Citrix Authentication App_Data resources

  • Copy ExplicitAuth.resx to ExplicitAuth.pl.resx
  • Copy ExplicitCore.resx to ExplicitCore.pl.resx
  • Copy ExplicitFormsCommon.resx to ExplicitFormsCommon.pl. resx

in all newly copied files, find element and the string in the corresponding translate element. Save each file with UTF-8 encoding. Run to restart the storefront server IIS command iisreset.

setting UI elements for the new language

In a Polish system Receiver for Web site in a browser should store now the user with all strings appear in the Polish view. If any translated strings are longer than the built-in languages ​​in Polish and are not positioned properly, it is worth noting that the language code ( "PL" in this case) appears as a class name in the day, and this can be used to create CSS definitions to adapt elements as needed

, for example, the following CSS definition would make the sign-in box a little wider when incorporated Polish using potential longer translated strings .:

 .pl .credentialform {width: 0px; } 

This CSS class is done for both the Unified Receiver user interface and the Classic UI have the same name. You need a CSS definition custom style.css for the unified receiver UI and contrib custom.style.css for the Classic UI insert.

Previous
Next Post »

1 comment

  1. Adding A Language 3.0 - What Is Vpn And How Does It Works >>>>> Download Now

    >>>>> Download Full

    Adding A Language 3.0 - What Is Vpn And How Does It Works >>>>> Download LINK

    >>>>> Download Now

    Adding A Language 3.0 - What Is Vpn And How Does It Works >>>>> Download Full

    >>>>> Download LINK tU

    ReplyDelete