This is explained in WWDC2020 session 10169.
At around eleven and a half minutes into the video, Anders Bertelrud, Apple engineer Developer Tools introduces the topic. An example is shown using Xcode 12 to add a default localisation parameter to the package manifest.
This declares the language I'm using during development and will be
used as the fallback localization at runtime if no better match is
available. This is needed for any package that contains resources.
An example manifest including the defaultLocalization
parameter can be seen as follows:
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "MyPackageUI",
defaultLocalization: "en",
platforms: [
.iOS(.v13)
],
products: [
.library(
name: "MyPackageUI",
targets: ["MyPackageUI"]),
],
targets: [
.target(
name: "MyPackageUI",
dependencies: []),
.testTarget(
name: "MyPackageUITests",
dependencies: ["MyPackageUI"]),
]
)