IntroductionOne of the situations I have found some solutions on the Internet, and use the code of texts, without having the possibility to change your content to another language, other than the standard or the "English". When performing this article Prentis developers to Sharepoint have the ability to deliver its solutions that can be used in several other countries and language than the original. SharePoint solution in Visual StudioAsssociar for the project should be created the folder "<hive> \ 12 \ CONFIG \ Resources \" which will support the files to translate. [Project Name]. Resx [Project Name]. PT.resx en- [Project Name]. US.resx en- To use resources such as file Features and solutions in support of SharePoint that are in the folder Hive "12" as feature.xml files should be necessary to create the resources folder "<hive> \ 12 \ Resources \ '. [Project Name]. Resx [Project Name]. Pt.resx [Project Name]. En.resx  To use the resources in code we can use the following example HttpContext.GetGlobalResourceObject ("[Project Name]" "[String name]"). ToString (); To use resources in the XML module
Example feature.xml: $ Resources: MyResources, MyName Whenever you need to add some text to support directly on the pages "ASPX" or "ASCX, it should come from the resx file. Example <% $ Resources: [Project Name], [String name]%> This Example is shown the architecture of our solution with a picture of how the file structure of Visual Studio will reflect in Sharepoint Solution. Installation and TroubleshootingAfter creating the WSP our solution, we can use aa solution Sharepoint Installer in a simple, simple. To use the resources created are saved in the Hive "" \ 12 \ Config \ Resources "will be necessary to copy the folder to Sharepoint Site" c: \ inetpub \ wwwroot \ wss \ VirtualDirectories \ 80 \ App_GlobalResources "going be used to accomplish the translation of Culture Site. To accomplish this task Microsoft has provided a command to copy these files to the folder in Sharepoint Site Example "Stsadm-o copyappbincontent" The new resources on "\ 12 \ Config \ Resources" folder are copied to the Sharepoint Site "c: \ inetpub \ wwwroot \ wss \ VirtualDirectories \ 80 \ App_GlobalResources" After installing the WSP solution using the site is necessary to activate the Feature for use with UserControl WebPart using Resources. Once activated our solution, we can add our WebPart to see the end result, if the site is as English Language Base, then appears in "1033" if the text appears in Portuguese in "2070." Done, here I leave attached the solution that they can use to create solutions using Resources. ConclusionI hope you enjoyed this solution and that is quite useful, sometimes it is complicated to pass all the ideas I have in mind for the role, but a perfect storm Sample Project SourceDownload source files -276 kb |