Initial commit, first views

This commit is contained in:
2023-01-12 23:07:37 +01:00
parent 830cb8785a
commit f87c712e41
19 changed files with 319 additions and 78 deletions
+30
View File
@@ -0,0 +1,30 @@
//
// Localizer.swift
// Firebonk
//
// Created by Patrick Müller on 12.01.23.
//
import Foundation
private class Localizer {
static let sharedInstance = Localizer()
func localize(string: String, tableName: String, plural: Bool) -> String {
var localizedString: String
if plural{
localizedString = NSLocalizedString(string, tableName: tableName, value:"**\(self)**", comment: "plural")
}else{
localizedString = NSLocalizedString(string, tableName: tableName, value:"**\(self)**", comment: "")
}
return localizedString
}
}
extension String {
func localized(tableName: String = "Localizable", plural: Bool = false) -> String {
return Localizer.sharedInstance.localize(string: self, tableName: tableName, plural: plural)
}
}
+13
View File
@@ -0,0 +1,13 @@
/*
General.strings
Firebonk
Created by Patrick Müller on 12.01.23.
*/
/* Tab Names */
"dashboard" = "Dashboard";
"people" = "Personen";
"spaces" = "Spaces";
"profile" = "Profil";
@@ -0,0 +1,7 @@
/*
Localizable.strings
Firebonk
Created by Patrick Müller on 12.01.23.
*/
+13
View File
@@ -0,0 +1,13 @@
/*
General.strings
Firebonk
Created by Patrick Müller on 12.01.23.
*/
/* Tab Names */
"dashboard" = "Dashboard";
"people" = "People";
"spaces" = "Spaces";
"profile" = "Profile";
@@ -0,0 +1,7 @@
/*
Localizable.strings
Firebonk
Created by Patrick Müller on 12.01.23.
*/