Last active
June 9, 2021 16:52
-
-
Save marybnq/56028e21a8a1ec6eae4ab1acded60179 to your computer and use it in GitHub Desktop.
A struct inside a String extension to store our app's localized strings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// LocalizedStrings.swift | |
// Localization | |
// | |
// Created by Federica Benacquista on 09/06/21. | |
// | |
import UIKit | |
extension String{ | |
/*Here goes the previous code, you can find it at: | |
https://gist.github.com/marybnq/f765d44cff15ea530e7ee09b0497d020 | |
*/ | |
/** | |
Struct containing all of the localized strings we use in our app | |
*/ | |
struct Localized { | |
static let hello = "Hello".localize //Contains the equivalent of NSLocalizedString("Hello", comment: "Hello") | |
static let edit = "Edit".localize | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment