Application display name localized

How can I change automatically the display name of an application? On apple developer I have found this:

  1. create a folder for every language (es, de, pt etc.)
  2. in each folder you must create a file “InfoPlist.strings”
  3. InfoPlist.strings must have this lines for Englisch language
    CFBundleDisplayName = “Thanks app”;
    CFBundleName = “ThanksApp”;
    and this for Spanish language
    CFBundleDisplayName = “Gracias app”;
    CFBundleName = “ThanksApp”;
  4. Add this line in the Application/Contents/Info.plist file
    Application has localized display name = YES

But the application display name in the finder is always the same English name. A Finder restart doesn’t solve the problem.

just an idea, I do not know if it will work

Const kAppName As String = “ThanksApp”

then in IDE
Mac App Name

#App.kAppName

[quote=197764:@Horst Jehle]How can I change automatically the display name of an application? On apple developer I have found this:

  1. create a folder for every language (es, de, pt etc.)
  2. in each folder you must create a file “InfoPlist.strings”
  3. InfoPlist.strings must have this lines for Englisch language
    CFBundleDisplayName = “Thanks app”;
    CFBundleName = “ThanksApp”;
    and this for Spanish language
    CFBundleDisplayName = “Gracias app”;
    CFBundleName = “ThanksApp”;
  4. Add this line in the Application/Contents/Info.plist file
    Application has localized display name = YES

But the application display name in the finder is always the same English name. A Finder restart doesn’t solve the problem.[/quote]

This should work. If you inspect an Apple application (e.g. Photo) you will see it’s done in this way.
Just, the name of the folders have “.lproj” extension and they must reside into the Resources folder of the bundle.

Yes, it works. The problem was a non UTF8 character in the app name.

Can i simply put this line as a new line below all the XML stuff?

InfoPlist.strings files are ASCII files and for the Info.plist file you should use Xcode or any other PLIST editor.

Now I have my app in the Dock and in the finder in English, German and Dutch language, but when I open the app, the app name in the apple.menu item is always “Contract Manager”. How can I resolve this?

For example the app “Chess” shows “Schach” in the German language.

If anyone will also support different display names for the application, you can use this script on the build for Mac OS X:

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 = ““Vertrags Manager””; '>>” + appPath + “/Contents/Resources/de.lproj/InfoPlist.strings”
Call DoShellCommand(command)
command = “/bin/echo 'CFBundleName = ““Contract Manager””; '>>” + appPath + “/Contents/Resources/de.lproj/InfoPlist.strings”
Call DoShellCommand(command)

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

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

Has anyone a idea how we I can use the display name for the Apple.Menu.Item (mentioned above) ?

Have you tried to peek into the plists of Chess/Schach where it says Schach instead of Chess?

Yes, now I have the same entries in Plist and in strings file, but the menu item for the Apple.Menu.item is always the English name.

Doesn’t Apple change the visible name of some system apps when changing localization? For instance, the english Calendar becomes Kalendar. Or Activity Monitor becomes Aktivittsanzeige. This is even done in Finder.

First thank you to all who are engaged with my question. Now I have the complete solution. The important think is to also change the CFBundleName for every language. So you must only use this script in the build for Mac OS X:

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 = ““Vertrags Manager””; '>>” + appPath + “/Contents/Resources/de.lproj/InfoPlist.strings”
Call DoShellCommand(command)
command = “/bin/echo 'CFBundleName = ““Vertrags Manager””; '>>” + appPath + “/Contents/Resources/de.lproj/InfoPlist.strings”
Call DoShellCommand(command)

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

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