-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Where should the I18n.configure() be put? #12
Comments
It should be called before you ask for the first time for some translation. |
Just a question: Why is there a need for configuring Swifternalization at all? Couldn't it just configure itself if it wasn't configured yet on the first call of a public class func localizedString(key: String, stringValue: String, fittingWidth: Int? = nil, defaultValue: String? = nil, comment: String? = nil) -> String {
guard sharedInstance.isConfigured else {
sharedInstance.load(NSBundle.mainBundle())
}
// more code
} This way configuration would be optional. |
@Dschee Indeed, that could work I think. Good catch! |
Added Will be available in the next release. Thanks! |
1.3.1 Released. |
The method I18n.configure() should be in the didFinishLaunchingWithOptions method of the appDelegate?
The text was updated successfully, but these errors were encountered: