OpenWaves.EPiServer.Localization

Provides strongly typed access to EPiServer lang (*.xml) files. Now you can use:

string text = TranslationKeys.MyPage.MyCategory.Intro.GetString();

// before
// string text = LocalizationService.Current.GetString("/myPage/myCategory/intro");

Usage

1. Add NuGet package OpenWaves.EPiServer.Localization
Install package
Install package
2. It's ready to use

NOTE: After changing language file (*.xml) you have to"Run Custom Tool" manually to regenerate translation key classes

run_custom_tool.png

EPiServer 6 & 7 support

Localization package support both EPiServer 6 & 7. To change version change Resources\TranslationKeys.tt:

var epiServerVersion = 6 or 7

...
<#@ import namespace="OpenWaves.EPiServer.Localization.Transformations" #>

<# 
    var epiServerVersion = 7;
    // for EPiServer 6.x version    
    // var epiServerVersion = 6;
...

Last edited Feb 20, 2013 at 12:44 PM by mjedynak, version 19

Comments

No comments yet.