Application methods

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

Back to Application class.

Application.BundleLocalizedStringMBS(key as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Process MBS Util Plugin ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the localized string for the given key from the default table.

A short version for BundleLocalizedString which uses the default table.

See also:

Application.BundleLocalizedStringMBS(key as string,fromtable as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Process MBS Util Plugin ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the localized string for the given key and table.
Example
// You may make yourself a function to look up for the key and return
// This function was not tested in a real application. May contain a bug.

function Localize(key as string, default as string) as string
dim s as string

s=app.BundleLocalizedStringMBS(key)
if s="" then
s=default // For Mac OS Classic and Windows
elseif s=key then // returns key for not localized items
msgbox "For developer: the key """+key+""" was not localized for any language."
end if

return s
end sub

// use like this
FileOpen.text=Localize("FileOpenLabel", "Open...")

The table parameter is optional to specify which ".strings"-file to use.
without table or table="" the "Localizable.strings" file is used by Mac OS X.

Returns "" (empty string) on Mac OS Classic or Windows.

See also:

The items on this page are in the following plugins: MBS Util Plugin.


💬 Ask a question or report a problem