Adding Translation to a SharePoint Page
1. Edit page as Content manager, site owner, or admin.
2. Add new web part as first item on the page
3. Add the “Modern Script Editor” web part.
4. Click on the “Edit snippet” button of the added script editor.
5. Add the following script and click the save button
6. Republish the page.
7. The language switcher should now be included at the bottom right of the page.