Implemented the "localise(key: )" static function in the String+Helper extension for the Browse module.

This commit is contained in:
Javier Cicchelli 2022-12-17 00:01:08 +01:00
parent 8247870e1e
commit 120356bf8e
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,11 @@
//
// String+Constants.swift
// Browse
//
// Created by Javier Cicchelli on 16/12/2022.
// Copyright © 2022 Röck+Cöde. All rights reserved.
//
extension String {
static let empty = ""
}

View File

@ -0,0 +1,19 @@
//
// String+Localisations.swift
// Browse
//
// Created by Javier Cicchelli on 16/12/2022.
// Copyright © 2022 Röck+Cöde. All rights reserved.
//
import Foundation
extension String {
static func localise(key: String) -> Self {
NSLocalizedString(
key,
bundle: .module,
comment: .empty
)
}
}