On macOS you may have noticed two special menu items that appear at the bottom of the Edit menu: “Start Dictation” and “Emoji & Symbols”. These menu items are added automatically by macOS provided your Xojo app follows a few simple rules.
For English systems you don’t have to do anything. By default the Edit menu text is “Edit” so macOS will find it and automatically add “Start Dictation” and “Emoji & Symbols”. Should you not want them to appear, you can change the text so that it is “Edit ” (with an extra trailing space).
For non-English systems you will need to provide a Dynamic Constant to use in place of the hard-coded text of “Edit” on the EditMenu. This dynamic constant needs to have the appropriate translation for Edit as required by macOS.
Here’s how you can set this up for a variety of languages.
Added a public Dynamic Constant to App:
Then use it in the menu:
When you run the project with French set as the primary language you will see “Démarrer Dictée” in the Édition menu:
Do the same thing for other languages you need. The easiest way that I found to determine the correct word was to change your System Language and then start a built-in Apple app such as Notes or Safari and make a note of what the “Edit” menu is called.
Download a project with the above languages in a Dynamic Constant.