iOS localized App Name

Wei jemand, wie das unter iOS gehen soll?

Ja, die notwendigen Zeilen kann ich aber erst am Abend liefern, da ich unterwegs bin. Das geht genauso wie bei einer macOS app.

Also unter Mac SO X habe ich es manuell in die plist eingetragen:

key>LSHasLocalizedDisplayName

und dann in der Info InfoPlist.strings die entsprechenden Bezeichnungen

Vielleicht geht es aber auch anders und einfacher??

Na klar. Ein kleines Build Script, das nach dem Build ausgeführt wird.

MakeDisplayName:
Dim appName As String = CurrentBuildAppName
appName = ReplaceAll(appName, " ", "\ ") // Escape spaces for the command line

Dim appPath As String = CurrentBuildLocation + “/” + appName // + “.app”

// Application Display Name in different Languages
command = "/usr/bin/defaults write " + appPath + “/Info ““Application has localized display name”” YES”
Call DoShellCommand(command)

Dim command As String
// German Display Name
command = “/bin/echo 'CFBundleDisplayName = ““Textilpflege””; '>>” + appPath + “/de.lproj/InfoPlist.strings”
Call DoShellCommand(command)
command = “/bin/echo 'CFBundleName = ““Textilpflege””; '>>” + appPath + “/de.lproj/InfoPlist.strings”
Call DoShellCommand(command)

// English Display Name
command = “/bin/echo ‘CFBundleDisplayName = ““Acana Textile Care””;’ >>” + appPath + “/en.lproj/InfoPlist.strings”
Call DoShellCommand(command)
command = “/bin/echo ‘CFBundleName = ““Acana Textile Care””;’ >>” + appPath + “/en.lproj/InfoPlist.strings”
Call DoShellCommand(command)

Für jede weitere Sprache das Script entsprechend erweitern.

Danke… hatte gehofft, es würde vielleicht mitlerweile aus Xojo heraus einstellbar sein… oder im AppWrapper… aber gut, dann halt so…

Danke

Das luft doch beim Build in in Xojo automatisch ab. Das ist doch innerhalb von Tojo.

Nur einmal eintragen und dann wird es beim Build immer ausgefhrt

Klappt sogar im Simulator…
Ich muss zugeben, ich hatte das bisher nie genutzt… erleichtert die Arbeit aber enorm

Ich muss hier leider nochmal nachharken, mit der iOS app klappt das wunderbar, mit der macOS app leider nicht, dort wird ein extra Ordner mit dem Appname angelegt, indem dann die info.plist liegt

Was kann das sein?

Für macOS muss das Script etwas anders aussehen.

Dim appName As String = CurrentBuildAppName
appName = ReplaceAll(appName, " ", "\ ") // Escape spaces for the command line

Dim appPath As String = CurrentBuildLocation + “/” + appName + “.app”

// Application Display Name in different Languages
command = "/usr/bin/defaults write " + appPath + “/Contents/Info ““Application has localized display name”” YES”
Call DoShellCommand(command)

Dim command As String
// German Display Name
command = “/bin/echo 'CFBundleDisplayName = ““Hausrat Verwaltung””; '>>” + appPath + “/Contents/Resources/de.lproj/InfoPlist.strings”
Call DoShellCommand(command)
command = “/bin/echo 'CFBundleName = ““Hausrat Verwaltung””; '>>” + appPath + “/Contents/Resources/de.lproj/InfoPlist.strings”
Call DoShellCommand(command)

// English Display Name
command = “/bin/echo ‘CFBundleDisplayName = ““Home Contents Manager””;’ >>” + appPath + “/Contents/Resources/en.lproj/InfoPlist.strings”
Call DoShellCommand(command)
command = “/bin/echo 'CFBundleName = ““Home Contents Manager””; '>>” + appPath + “/Contents/Resources/en.lproj/InfoPlist.strings”
Call DoShellCommand(command)

Super, danke