Strings in Applescript depends on the system language - are there universal names?

 ̄綄美尐妖づ 提交于 2019-12-04 19:58:41

AppleScript supports NSLocalizedString (localized string). You need to refer to and pull out the strings from the corresponding framework bundles.

For example:

set finderPath to path to application "Finder"
(localized string "A16" in bundle finderPath)

The result is:

  • in English: You can’t undo this action.
  • in German: Diese Aktion kann nicht widerrufen werden.

localized string has two optional parameters:

  • from table : The name of the strings file excluding the “.strings” suffix (default is “Localizable”)
  • in bundle : An alias or file reference to the bundle containing the strings file (default is the current application/script bundle)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!