Posts Tagged ‘l10n’
Ektron and Localization Tags
Friday, May 23rd, 2008
I ran across an interesting API library deep in the Ektron API framework that allows you to pull the actual localization tag (e.g. en-US, en-GB, etc.) for the current language type id of the site (e.g. 1033, 2058, etc.). Previous to this, we had to create our own associative, key/value pair XML file that stored the relationships. Since I could only find a single reference to this library on the Ektron site, I hoping this information proves useful to others. Enjoy.
// get and instance of the current site API object
Ektron.Cms.SiteAPI sAPI = new Ektron.Cms.SiteAPI();
// retrieve the language date for the current site API instance
Ektron.Cms.LanguageData ld = sAPI.GetLanguageById(ContentBlock.LanguageID);
// assign the localization tag
string langTag = Ld.XmlLang;
I ran across an interesting API library deep in the Ektron API framework that allows you to pull the actual localization tag (e.g. en-US, en-GB, etc.) for the current language type id of the site (e.g. 1033, 2058, etc.). Previous to this, we had to create our own associative, key/value pair XML file that stored the relationships. Since I could only find a single reference to this library on the Ektron site, I hoping this information proves useful to others. Enjoy.
// get and instance of the current site API object
Ektron.Cms.SiteAPI sAPI = new Ektron.Cms.SiteAPI();
// retrieve the language date for the current site API instance
Ektron.Cms.LanguageData ld = sAPI.GetLanguageById(ContentBlock.LanguageID);
// assign the localization tag
string langTag = Ld.XmlLang;
"Star Wars"
.NET
Articles
Avatars
Body for Life
Daybreak
Development
Ektron
Family
Flash
Food
Gaming
Google
Hardware
Humor
Internet
Kids
Media
Microsoft
Movies
Music
News
Off-Topic
Off-Topic
Other Resources
Politics
Programming
Ranting
Religion
Remenisce
SciTech
Security
SEO
Silverlight
Snipits
Software
SQL Server
Support
Technology
Utah
Web
Web 2.0
Windows Live
Wordpress
YouTube