I use this struct :
struct Constants {
struct array {
static let fuel = [NSLocalizedString("Gasoline", comment: ""),
NSLocalizedString("Diesel", comment: ""),
NSLocalizedString("Hybrid", comment: ""),
NSLocalizedString("Electric", comment: ""),
NSLocalizedString("other", comment: "")]
}
}
I do the call Constants.array.fuel in other place, it's work fine.
the problem is when I change the app language, the NSLocalizedString not working as expected (I get the old translate).
probably because I use static. in other viewcontrollers, NSLocalizedString works fine.
when I remove static, I get :
Instance member 'fuel' cannot be used on type 'Constants.array'
any help please.