let langId = Locale.current.identifier.prefix(2)
let langInt: Int
init() {
switch langId {
case "ja":
self.langInt = 0
case "en":
self.langInt = 1
case "fr":
self.langInt = 2
default:
self.langInt = 1
}
}
func getText(textId: Int) -> String {
return texts[textId][langInt]
}
More than 1 year has passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
List of users who liked
00