Portal Engine
Version 2.x > Portal Engine > Getting translated UI culture strings to show View modes: 
User avatar
Member
Member
persun - 11/15/2006 8:30:00 PM
   
Getting translated UI culture strings to show
I have created a new UI culture (sv-SE, Swedish) and translated a couple of strings from English to Swedish, such as webpart.searchbox.label. I have also activated the Swedish culture for my test site (Swedish - Sweden). So far so good. The problem is that no matter what I do I cannot get my translated string to show. As I switch between the English and the Swedish version of the site the search box stays labelled "Search:". What am I missing here?

Also... when I click "Ok" in the edit dialog for UI culture strings an error message appears saying "String key '' already exists" appears. Only the first time I edit a string though. The second time I get "The changes were saved." Is this a bug that could be related to my problem?

Thanks,

Per

User avatar
Member
Member
persun - 11/16/2006 9:06:31 AM
   
Re: Getting translated UI culture strings to show
Hmm... when I returned to work today the translated strings suddenly start to show up. Is this a caching issue? Strange. I set content caching etc to 0 minutes yesterday to be sure. I also restarted the website several times. Is there some other caching scheme I should know of?

Thanks,

Per

User avatar
Guest
admin - 11/16/2006 9:55:57 AM
   
Re: Getting translated UI culture strings to show
Hello,

Thank you for your message. Unfortunately, both are bugs in version 2.0a.

You can fix displaying of translated strings by adding the following lines into the app_code\cmspages\portalpage.cs, at the end of the PortalPage_PreInit method:

// Set the culture
CurrentUserInfo ui = CMSContext.CurrentUser;
if (ui != null)
{
if ((ui.PreferredCultureCode != null) && (ui.PreferredCultureCode != ""))
{
System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo(ui.PreferredCultureCode);
System.Threading.Thread.CurrentThread.CurrentCulture = ci;
System.Threading.Thread.CurrentThread.CurrentUICulture = ci;
}
}

It will ensure that the UI culture is set to the current content culture on all portal pages and the translated strings will be used.

The second bug - saving of strings - will be fixed in version 2.0b next week.

I'm sorry for this inconvenience.

Best Regards,


User avatar
Member
Member
persun - 11/16/2006 10:23:54 AM
   
Re: Getting translated UI culture strings to show
Alright, I see. Good to know there's a workaround for now! Thanks

Another thing... is there a quick way to jump between strings as you are translating (like "previous" and "next" buttons). If not, is this something that could be considered for 2.0b? It's a lot of work to have to go back to the complete list of strings and isolate the strings you were translating (for every translation you make).

/ Per

User avatar
Guest
admin - 11/16/2006 10:39:44 AM
   
Re: Getting translated UI culture strings to show
Yes, we know string translation not not comfortable now and we have created an export/import utility that exports strings to resx file that can be comfortably edited in VS2005 and imports it back to the database. It will be available in version 2.0b next week.

Best Regards,

User avatar
Member
Member
persun - 11/16/2006 10:43:51 AM
   
Re: Getting translated UI culture strings to show
Great to hear!