Xource library must be initialized when application is loaded.

In Global.asax place following code in Application_Start() method:


Or if you would like to initialize it in adaptive mode

Xource.Helper.XourceHandler.Initialize(mode: LocalizationMode.Adaptive)

There are 2 localization modes available:

Default Will use default column in excel worksheet. This mode should be used when you support multilingual site but by default you want to it to load always in default language and let user choose other supported languages. This behavior is  available in DemoWebSite which is part of the source code
Adaptive This option should be used if you want Xource to determine if user language preference is supported by your site and if it does to display content in this language

The Initialize method has 3 overloads:

  1. Will look for Content.xlsx file during runtime in Xource folder
  2. Where you can provide location for Content.xlsx file
  3. Where you can provide Stream object

Last edited Apr 21, 2014 at 1:39 PM by eddyuk, version 2