skip
skip copied to clipboard
Bridge `String(localized:bundle:)`
Currently, String(localized:table:bundle:locale:comment:) is not bridged and we most fallback to NSLocalizedString.
It would be a nice addition to reduce the amount of changes needed to port existing iOS codebases.
Note that for the short term, you could implement it yourself and forward the calls to NSLocalizedString. At least that way when we eventually implement String(localized:), you could just be able to remove your per-module override.
E.g.,
#if os(Android)
extension String {
init(localized: String, bundle: Bundle, comment: String) {
self = NSLocalizedString(…)
}
}
#endif