More in this section

Forums / Developing with Sitefinity / Advice : multi language and preserve relative paths

Advice : multi language and preserve relative paths

4 posts, 0 answered
  1. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    13 May 2010
    Link to this post
    Hi,

    I have one biggest sf project using multi languages, full ajax, javascripting and css styles that need many times point to relatives paths using sf of course. To manage languages i have opted to use querystring like ...aspx?sflang=de to preserve these relatives paths pointing to my style sheets and other ajax resources. Exist others ways  to make similar using SF without need to change the rel path to the resources?.  What are the best options including seo consequences?.

    Advices, practices, tips welcome !

    Romi   
  2. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    13 May 2010
    Link to this post
    Hi there,

    I have worked extensively with multi language and Sitefinity and there are few tricks that will definitely make your life easier. I think I need more info on how you applied the localization whether through pass prefix or domain however here are some tips from my personal experience with localization and Sitefinity:

    1- Use multiple themes for multiple languages, let's say you have English and Italian and each version has its own set of stylesheet files. You create two themes, one called SiteName English and the other SiteName Italian and this way each page you create will get the style sheets according to the culture because each culture has its own theme.

    2- For the other set of files, let's say JS and Images, you can use the Global Resources to achieve this. Let's say on the home page of your english website you want to display MyImage_en.jpg and on the Italian home page you want to display MyImage_it.jpg. You add a resource entry to the Global Resources one called HomeImage with value MyImage_en.jpg in the English resource file and the other HomeImage with value MyImage_it.jpg in the Italian resource file and you're good to go.

    3- Use Telerik.Cms.Web.UrlHelper.ResolveUrl. It is a helper method in sitefinity that gets the relative path according to the current culture and this method really saved me as before I had to code the same functionality myself.

    Hope this helps.

    George
  3. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    13 May 2010
    Link to this post
    Hi G- Force,

    Using this solution in 2 or more languages and small or medium site target for a company audience is a perfect solution, but if you target a biggest market and pointing to 10 or 15 language you can not multiply the duplicated resouces and images that overload your storage solution, prices, complexity the evolutivition and maintenance. I´m crazy only with the maintain of base including more of 30 modules and mobile solutions.
    Thanks for your experience G-Force.

    Others advices welcome.
  4. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    13 May 2010
    Link to this post
    You are absolutely right about that and this is one of the tedious problems when working with Sitefinity and Localization that you always have to DUPLICATE and this as web developers we find it extremely not professional and will make our life as HELL. Good luck finding better solutions as I have wearied myself on this forum before asking these kind of questions. From my humble experience, I say resource files are your only option.

    Cheers
Register for webinar
4 posts, 0 answered