Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions Sources/SimpleKeyboard/Models/Language.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@ public enum Language: CaseIterable {
}

case english, german, spanish, french, russian, hindi
case swedish, danish, norwegian, finnish

var alternateKeys: [String: String] {
switch self {
case .german: return ["a": "ä", "o": "ö", "u": "ü"]
// spanish also has ü
case .spanish: return ["e": "é", "a": "á", "i": "í", "o": "ó", "u": "ú", "n": "ñ"]
case .french: return ["e": "é", "a": "à", "u": "ù", "i": "î", "o": "ô", "c": "ç"]
// Nynorsk uses several letters with diacritic signs: é, è, ê, ó, ò, â, and ô. The diacritic signs are not compulsory
case .danish, .norwegian: return ["e": "é"]
// Though not in the official alphabet, á is a Swedish (old-fashioned) letter. In native Swedish personal names, ü and è and others are also used.
case .swedish: return ["a":"á", "u":"ü", "e": "è"]
case .finnish: return ["s": "š", "z": "ž"]
default: return [:]
}
}
Expand Down Expand Up @@ -72,6 +78,33 @@ public enum Language: CaseIterable {
["ो", "े", "्", "ि", "ु", "प", "र", "क", "त", "च"],
["ं", "म", "न", "व", "ल", "स", "य"]
]
case .swedish:
result = [
["q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "å"],
["a", "s", "d", "f", "g", "h", "j", "k", "l", "ö", "ä"],
["z", "x", "c", "v", "b", "n", "m"]
]
case .danish:
result = [
["q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "å"],
["a", "s", "d", "f", "g", "h", "j", "k", "l", "æ", "ø"],
["z", "x", "c", "v", "b", "n", "m"]
]

case .norwegian:
result = [
["q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "å"],
["a", "s", "d", "f", "g", "h", "j", "k", "l", "ö", "ä"],
["z", "x", "c", "v", "b", "n", "m"]
]

case .finnish:
result = [
["q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "å"],
["a", "s", "d", "f", "g", "h", "j", "k", "l", "ø", "æ"],
["z", "x", "c", "v", "b", "n", "m"]
]

}

if areUppercased {
Expand Down
12 changes: 12 additions & 0 deletions Sources/SimpleKeyboard/l10n/da.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"space" = "mellemrum";

"Up" = "St";

"lw" = "sm";

"Done!" = "Udført!";

"Search" = "Søg";

"Go!" = "Gå!";

11 changes: 11 additions & 0 deletions Sources/SimpleKeyboard/l10n/fi.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"space" = "Väli";

"Up" = "Ylös";

"lw" = "lk";

"Done!" = "Valmis!";

"Search" = "Etsi";

"Go!" = "Mene!";
11 changes: 11 additions & 0 deletions Sources/SimpleKeyboard/l10n/no.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"space" = "Mellomrom";

"Up" = "Opp";

"lw" = "lw";

"Done!" = "Ferdig!";

"Search" = "Søk";

"Go!" = "Gå!";
11 changes: 11 additions & 0 deletions Sources/SimpleKeyboard/l10n/sv.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"space" = "Mellanslag";

"Up" = "Upp";

"lw" = "lk";

"Done!" = "Klart!";

"Search" = "Sök";

"Go!" = "Gå!";