import WorkspaceConfiguration .product(name: "WorkspaceConfiguration", package: "Workspace")
Instance Property


The localisations supported by the project.


var localisations: [LocalisationIdentifier] { get set }


The default contains no localisations, but some tasks may throw errors if they require localisations to be specified.

Localising Documentation

When documenting with more than one localisation active, each documentation comment must be marked according to its localisation.

// @localization(🇫🇷FR) /// Vérifie l’inégalit // @localization(🇬🇧EN) @localization(🇺🇸EN) /// Checks for inequality. infix operator

Localised versions of a symbol can be cross‐referenced with each other so that they will be treated as the same symbol. In the following example, doSomething() will only appear in the English documentation and faireQuelqueChose() will only appear in the French documentation. Switching the language while looking at one of them will display the opposite function.

// @localization(🇬🇧EN) @localization(🇺🇸EN) @crossReference(doSomething) /// Does something. public func doSomething() {} // @localization(🇫🇷FR) @crossReference(doSomething) /// Fait quelque chose. public func faireQuelqueChose() {}

A set of cross references can opt out of a particular localisation. This can be useful when providing aliases for something that pre‐exists in only some of the localisations.

// @localization(🇫🇷FR) @notLocalised(🇬🇧EN) /// Une chaîne de caractère public typealias ChaîneDeCaractères = String
macOS CentOS Ubuntu Amazon Linux