Apple platforms go out of their way to avoid mixed localisation, that is, having one part of your app in language A while another part in in language B. I suspect what’s going on here is that Foundation thinks your command-line tool is localised for English and thus is giving you the English localisation.
This makes sense to me. In many ways you can think of a command-line tool as a plug-in for Terminal. Imagine your command-line tool prints the Documents folder name. You want that output to be aligned with the value that the user sees when they do an ls.
If you put this code into an app and localise the app for your target language, you should get the right value.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"