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

Forums / Developing with Sitefinity / Sitefinity 4 Language Selector

Sitefinity 4 Language Selector

6 posts, 0 answered
  1. Brin
    Brin avatar
    18 posts
    Registered:
    04 Oct 2010
    06 Mar 2012
    Link to this post
    Hi

    I'm evaluating Sitefinity for use on a multilingual website. I have added a 2nd frontend language in the backend and dropped the language selector onto my template. I have also created 2 pages 1 for each language and added different content to each.

    When I click a language in the selector the URL changes correctly but the page content remains in English, eg it does not show the content that was added for the selected language and page. I also notice the Page.Culture & Page.UICulture do not change when selecting a language so cannot see how this would work when using local resource files on user controls.

    Do you have any further documentation on this? It has to be said the 1 page you have provided in the documentation is far from comprehensive and does not address the usage of resx files for storing local non-content managed user control text for example form labels.

    Thanks

    Brin
  2. Brin
    Brin avatar
    18 posts
    Registered:
    04 Oct 2010
    07 Mar 2012
    Link to this post
    Any ideas? Anyone? Can anyone tell me how set the page culture from the language selector?

    I've just checked through the showcase area of the site and cannot see a single multilingual implementation in Sitefinity 4 that actual works well, I'm starting to think there's a reason for this. 
  3. Jen Peleva
    Jen Peleva avatar
    568 posts
    Registered:
    10 Nov 2016
    09 Mar 2012
    Link to this post
    Hello Brin,

    This is really unusual. Multilingual pages should display pages on their own language. However, if you, for example, have a content block in the first page and the content in it is in English, then the other language page would also display the English content, simply because the content block exists on both pages and doesn't have different translations.
      Below you will find attached a video, where I've created two translations of a page. Please verify that you made the same configurations when you created your pages and configuring the language selector widget.

    All the best,
    Jen Peleva
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  4. Brin
    Brin avatar
    18 posts
    Registered:
    04 Oct 2010
    09 Mar 2012
    Link to this post
    Hi Jen

    Thanks for your response, however I don't see any controls that use resx files in your example. Or evidence that the Page.Culture / Page.UICulture have been set.

    Thanks

    Brin
  5. Jen Peleva
    Jen Peleva avatar
    568 posts
    Registered:
    10 Nov 2016
    14 Mar 2012
    Link to this post
    Hi Brin,

    I've tested the language selector again, but this time with our resource files. Take at the video. For this purpose I've created a simple user control that gets the current culture of the page and displays it in a label. I've also included another label, where a resource file is set to its Text property. As you see, on pages the label is displayed depending on the culture of the page, which is the expected behavior. Keep in mind that in order to have different language versions of the resource files you would have to import the corresponding language pack (in my case Spanish language pack). Otherwise Sitefinity won't have access to the translation you're looking for, because it doesn't exist, and will display the label (or other resource in English, since it's the default language.) I've attached a screenshot of a Greek page. Note that the label displays Search in English, because I don't have Greek language pack imported. You will also find my test control in a zip file below.

    Kind Regards,
    Jen Peleva
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Brin
    Brin avatar
    18 posts
    Registered:
    04 Oct 2010
    14 Mar 2012
    Link to this post
    Hi Jen

    Thanks for your response - you can now ignore my other post regarding resource files and the text property. It appears that Sitefinity does not like one setting a controls resource by using the meta:resourcekey attribute, instead it needs to be done as shown in your example.

    Thanks again

    Brin
6 posts, 0 answered