Tuto WEBDEV 25
Part 5: Let’s continue the development 247 Programming ▶ To type the code for managing languages: 1. Select "LANGUAGES .. FRENCH" in the page template displayed in the editor. 2. Display the popup menu (right click). Select "Code". 3. Enter the following code in the server code of the menu option: Nation(nationFrench) PageUse(CurrentPage()) 4. Close the code window. 5. Select "LANGUAGES .. ENGLISH" in the page template displayed in the editor. 6. Display the popup menu (right click). Select "Code". 7. Write the following code: Nation(nationEnglish) PageUse(CurrentPage()) In this code: • Nation is used to change the runtime language of the site. The constants passed in parameter allow you to specify the language to use. • PageUse is used to reload a page (the current page in our case) in order to take the change of language into account. 8. Close the code window. 9. Press Esc to exit from the edit mode. 10. Save the page template ( or Ctrl + S). 11. Update the pages that use the page template by clicking the icon in the orange bar. Validate the update window. 12. Close the page template displayed in the editor.
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==