05 Oct 2010
04 Nov 2010
Link to this post
I've been searching for tutorials on localizing with sitefinity and I haven't found exactly what I'm looking for. I have localization enabled for my site and my pages have multiple versions (fr/en/es/etc), but I want my user controls to grab values from local resource files and I haven't been able to get this to work...
Most tutorials out there tell you to go to Tools > Generate Local Resource and you're done, but I don't even have that option (I'm using VS2008 and I'm using the browser app, not the VS web app). I created an App_LocalResources folder in my website folder (%sitefinityDir%\Websites\siteName\App_LocalResources) and I have a page called TestLogin.aspx with a single module on it called MyCustomLogin.ascx (has a .cs behind it too). MyCustomLogin has 2 labels, lblUsername and lblPassword, which I want localized via a resource file.
I've already tried putting MyCustomLogin.ascx.resx (and its .es / .fr versions as well) into the app_local resource folder, along with meta:resourcekeys in the code and even <% $Resources:resourceName %> into the appropriate positions, but none of these methods work...
Is %sitefinityDir%\Websites\siteName\App_LocalResources the right directory for that folder? should it be GlobalResources? Is there a way to properly link the files (I just threw them in there with names, assuming Sitefinity recognized them like everything else)?
Thanks in advance,