aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/LocalizationHelper.swift
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2018-12-18 16:30:16 +0530
committerRoopesh Chander <roop@roopc.net>2018-12-21 18:34:09 +0530
commit0552d75aa1d9e4e496bd066973fdf59726a4f235 (patch)
tree58b6a008f1ffeb974f7ca24ac51c98a971eaa41a /WireGuard/WireGuard/LocalizationHelper.swift
parentTunnel detail: iPad: Handle deletion of tunnel correctly (diff)
downloadwireguard-apple-0552d75aa1d9e4e496bd066973fdf59726a4f235.tar.xz
wireguard-apple-0552d75aa1d9e4e496bd066973fdf59726a4f235.zip
Localize all the things
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard/LocalizationHelper.swift')
-rw-r--r--WireGuard/WireGuard/LocalizationHelper.swift12
1 files changed, 12 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/LocalizationHelper.swift b/WireGuard/WireGuard/LocalizationHelper.swift
new file mode 100644
index 0000000..ea4cc64
--- /dev/null
+++ b/WireGuard/WireGuard/LocalizationHelper.swift
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: MIT
+// Copyright © 2018 WireGuard LLC. All Rights Reserved.
+
+import Foundation
+
+func tr(_ key: String) -> String {
+ return NSLocalizedString(key, comment: "")
+}
+
+func tr(format: String, _ arguments: CVarArg...) -> String {
+ return String(format: NSLocalizedString(format, comment: ""), arguments: arguments)
+}