+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Running Sitefinity (public side) in German

Running Sitefinity (public side) in German

2 posts, 1 answered
  1. Bernhard König
    Bernhard König avatar
    2 posts
    Registered:
    11 Nov 2009
    15 Nov 2009
    Link to this post
    While my tests with Sitefinity, currently the Community Edition, i ran into another problem: I'd like to have my website in German (the Administration Interface can remain in English, though).

    I know Community Edition does not support multilple language interfaces, but I just want to switch from English to German. Unfortunately, I can't find any options for this.

    Also I read in the forums, that currently there is no German translation available for Sitefinity, even for the full edition. Again, I won't care for the Admin Interface, but for the modules, like blog, it would be important to prevent mixed language interfaces.

    Some modules run german on the other hand, like the Login Status control that shows "Abmelden" on my site instead of "Log off". Maybe because it utilizes the underlying .NET control.

    In the controls folder, I found some resx files for some controls that seem to be able to translate them by myself. Although there would be a problem with updating to a newer version when those files get overridden again. On the other hand, for the blog module there aren't any files that I could translate.

    So ... what can I do to transform my website in a german-only one? Any suggestions?

    Thanks a lot,
    Bernhard
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    16 Nov 2009
    Link to this post
    Hi Bernhard König,

    Community edition does not support localization which means that you need to create your own implementation for setting the culture thread.

    You can create IHttpHandler that gets the current request and change the CurrentCulture. You can use LocalResource files to change the labels.

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Globalization;
     
     
    public class HttpModuleCustom : IHttpModule
    {
     
        #region IHttpModule Members
     
        public void Dispose()
        {
             
        }
     
        public void Init(HttpApplication context)
        {
            context.BeginRequest += new EventHandler(context_BeginRequest);
        }
     
        void context_BeginRequest(object sender, EventArgs e)
        {
            // HERE YOU CAN USE QUERYSTRING INSTEAD OF HARCODING
            HttpContext context = HttpContext.Current;
            CultureInfo ci = System.Threading.Thread.CurrentThread.CurrentUICulture;
            System.Threading.Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("bg");
        }
     
        #endregion
    }


    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
2 posts, 1 answered