Closed Nodirbek-Khudoyberdiev closed 9 months ago
There is no feature in R.swift for changing a language globally.
You can create localised instances of specific R sub structures like so:
let english = R.string(preferredLanguages: ["en"])
let french = R.string(preferredLanguages: ["fr"])
@Nodirbek-Khudoyberdiev
import RswiftResources
extension StringResource {
public func callAsFunction() -> String {
String(resource: self, preferredLanguages: [RunInfo.shared.currentLanguage.code])
}
}
you can write like this, and reload table maybe.
I want to change app language depending on users preference, but R Localization picks up phones language, how to change it globally.