-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #244 from THEOplayer/feature/localize-ads-ui
Feature/localize ads UI
- Loading branch information
Showing
8 changed files
with
78 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// THEOplayerRCTView+UIConfig.swift | ||
|
||
import Foundation | ||
import THEOplayerSDK | ||
|
||
struct UIConfig { | ||
var language: String = "en" | ||
} | ||
|
||
extension THEOplayerRCTView { | ||
|
||
func parseUIConfig(configDict: NSDictionary) { | ||
if let uiConfig = configDict["ui"] as? NSDictionary { | ||
if let uiLanguage = uiConfig["language"] as? String { | ||
self.uiConfig.language = uiLanguage | ||
} | ||
} | ||
} | ||
|
||
func playerUIConfiguration() -> UIConfiguration? { | ||
return UIConfiguration(language: self.uiConfig.language) | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* Describes the UI related configuration of the player. | ||
* | ||
* @public | ||
*/ | ||
export interface UIConfiguration { | ||
/** | ||
* The language which is used for localization. | ||
* | ||
* @example | ||
* ``` | ||
* ui: { | ||
* language: 'es', | ||
* } | ||
* ``` | ||
*/ | ||
language?: string; | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './UIConfiguration'; |