Internationalisation
Bundled Plugins API
strings
The cp.strings for I18N lookups related to Final Cut Pro. This has been populated with common lookups for user interface values that appear in Final Cut Pro.

API Overview

  • Constants - Useful values which cannot be changed
  • strings
  • Methods - API calls which can only be made on an object returned by a constructor
  • find
  • findKeys

API Documentation

Constants

strings

Signature
cp.apple.finalcutpro.strings <cp.strings>
Type
Constant
Description
The cp.strings providing access to common FCPX text values.

Methods

find

Signature
cp.apple.finalcutpro.strings:find(key[, locale][, quiet]]) -> string
Type
Method
Description
Looks up an application string with the specified key.
Parameters
  • key - The key to look up.
  • locale - Optional locale to retrieve the key for, if available. May be a string or cp.i18n.localeID.
  • quiet - Optional boolean, defaults to false. If true, no warnings are logged for missing keys.
Returns
  • The requested string or nil if the application is not running.

findKeys

Signature
cp.apple.finalcutpro.strings:findKeys(string[, lang]) -> {string}
Type
Method
Description
Looks up an application string and returns an array of keys that match. It will take into account current language the app is running in, or use lang if provided.
Parameters
  • string - The string to look up.
  • lang - The language (defaults to current FCPX language).
Returns
  • The array of keys with a matching string.
Notes
  • This method may be very inefficient, since it has to search through every possible key/value pair to find matches. It is not recommended that this is used in production.
Last modified 1mo ago
Export as PDF
Copy link