Send the link below via email or IMCopy
Present to your audienceStart remote presentation
- Invited audience members will follow you as you navigate and present
- People invited to a presentation do not need a Prezi account
- This link expires 10 minutes after you close the presentation
- A maximum of 30 users can follow your presentation
- Learn more about this feature in our knowledge base article
Localization And You
Transcript of Localization And You
Provide a resourceProviderFactoryType definition in web.config
The factory extends ResourceProviderFactory and overrides two methods
CreateGlobalResourceProvider(string) & CreateLocalResourceProvider(string)
There is a Provider for each resource Type (ie. ProductsLanguage, OrdersLanguage)
We are only concerned with Global resources
The GlobalProvider implements IResourceProvider which defines only one method
public object GetObject(string resourceKey, CultureInfo culture)
The provider contains our custom Business logic...Let's take a look...
Out of the box functionality
Microsoft provides the ResXResourceProviderFactory
This factory is used to create an IResourceProvider instance The Localization Utility Two versions Stand-Alone (for injection) PageBase (for code behind) public string GetLocalizedResource<T>(Expression<Func<T, string>> expr) public string GetLocalizedResource<T>(string keyValue) Implements IGlobalResourceLocalizationUtility public string GetLocalizedResource<T>(Expression<Func<T, string>> expr) Eliminates the need for "magic strings"
Provides error handling, and fallback behavior Best Practices Use the Utility
Enter a date into the comment section when adding a new Resource,
or changing a pre-existing one. Future Plans Performance Performance Performance Move all resources to the DB Perhaps a UI so Organizations can manage their own resources Need a caching solution! Any Questions?