Localizing a web part
Git branch
This section uses the https://github.com/PacktPublishing/Mastering-SharePoint-Development-with-the-SharePoint-Framework-/tree/chapter5/localize-webpart Git branch from the repository.
A SharePoint site can support multiple languages for users. When they access the site, the UI is automatically displayed in their preferred language if it has been enabled in the site settings:
 
				Figure 5.9 – SharePoint site supported languages
User-preferred language
The user-preferred language is determined by the language set in the user profile. If not set, the current browser language is used. To force a language on a site, an admin can simply disable all available languages to keep the default one. In this case, user preferences won’t be applied.
For SPFx web parts, the following elements can be localized:
- Web part content in the UI
- Web part manifest file
- Web part property pane
In the following...
 
                                             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
     
         
                 
                 
                 
                 
                 
                 
                 
                 
                