-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#96 setup language db connection and add query function
- Loading branch information
1 parent
713dd59
commit 5effd73
Showing
5 changed files
with
270 additions
and
115 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,34 @@ | ||
// | ||
// File.swift | ||
// Scribe | ||
// Utilities.swift | ||
// | ||
// Created by Andrew Tavis on 13.04.23. | ||
// Simple utility functions for data extractiona and language management. | ||
// | ||
|
||
import Foundation | ||
|
||
/// Returns the ISO code given a langauge. | ||
/// | ||
/// - Parameters | ||
/// - language: the language an ISO code should be returned for. | ||
func get_iso_code(keyboardLanguage: String) -> String { | ||
var iso = "" | ||
switch keyboardLanguage { | ||
case "French": | ||
iso = "fr" | ||
case "German": | ||
iso = "de" | ||
case "Italian": | ||
iso = "it" | ||
case "Portuguese": | ||
iso = "pt" | ||
case "Russian": | ||
iso = "ru" | ||
case "Spanish": | ||
iso = "es" | ||
case "Swedish": | ||
iso = "sv" | ||
default: | ||
break | ||
} | ||
|
||
return iso | ||
} |
Oops, something went wrong.