File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Sources/CrowdinSDK/CrowdinSDK Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ public typealias CrowdinSDKLogMessage = (String) -> Void
9393 /// - Parameters:
9494 /// - sdkLocalization: Bool value which indicate whether to use SDK localization or native in bundle localization.
9595 /// - localization: Localization code to use.
96- @available ( * , deprecated, message: " Please use setCurrentLocalization(_:completion:) instead. " )
96+ @available ( * , deprecated, message: " Please use setCurrentLocalization(_:completion:) and getCurrentLocalization() methods instead. " )
9797 public class func enableSDKLocalization( _ sdkLocalization: Bool , localization: String ? ) {
9898 self . currentLocalization = localization
9999 }
@@ -106,6 +106,13 @@ public typealias CrowdinSDKLogMessage = (String) -> Void
106106 public class func setCurrentLocalization( _ localization: String ? , completion: @escaping CrowdinSDKLocalizationChangeCompletion ) {
107107 Localization . setCurrentLocalization ( localization, completion: completion)
108108 }
109+
110+ /// Method to get current SDK localization.
111+ /// - Returns: Current SDK localization
112+ public class func getCurrentLocalization( ) -> String ? {
113+ return Localization . currentLocalization
114+ }
115+
109116
110117 /// Utils method for extracting all localization strings and plurals to Documents folder.
111118 /// This method will extract all localization for all languages and store it in Extracted subfolder in Crowdin folder.
You can’t perform that action at this time.
0 commit comments