So I have a requirement to change the locale of a site collection at runtime.
I am deploying a .resx file into the web applications App_GlobalResources folder, then I am using:
<asp:Literal runat="server" Text="<%$Resources:MyResource,MyLocalizedStringID%>" />
to insert the right localized string.
This works fine for the default resource file but I want the locale of the site to change when the user changes the locale in Regional Settings. Even when the user changes the locale it still picks up the default resource file.
I know with ASP.Net I need to change the CurrentCulture which I have done before, but how do I do this with SharePoint? and how do I make my site collection load the correct resource file?
I could place a dropdown on the page and allow the user to select the language then change the CurrentCulture and I could also create another Site Settings entry which does the same thing.
But ideally I would like to do this with the out of the box regional settings.
Any ideas?