File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -15,24 +15,26 @@ public final class BuilderIOManager {
1515
1616 private let apiKey : String
1717 public let customNavigationScheme : String
18+ public let locale : String ?
1819
1920 private static var registered = false
2021
21- public static func configure( apiKey: String , customNavigationScheme: String = " builderio " ) {
22+ public static func configure( apiKey: String , customNavigationScheme: String = " builderio " , locale : String = " Default " ) {
2223 guard _shared == nil else {
2324 print (
2425 " Warning: BuilderIOManager has already been configured. Ignoring subsequent configuration. " )
2526 return
2627 }
2728 Font . registerFonts ( )
28- _shared = BuilderIOManager ( apiKey: apiKey, customNavigationScheme: customNavigationScheme)
29+ _shared = BuilderIOManager ( apiKey: apiKey, customNavigationScheme: customNavigationScheme, locale : locale )
2930 }
3031
3132 // MARK: - Private Initialization
3233
33- private init ( apiKey: String , customNavigationScheme: String ) {
34+ private init ( apiKey: String , customNavigationScheme: String , locale : String ) {
3435 self . apiKey = apiKey
3536 self . customNavigationScheme = customNavigationScheme
37+ self . locale = locale
3638
3739 if !Self. registered {
3840 BuilderComponentRegistry . shared. initialize ( )
@@ -60,7 +62,7 @@ public final class BuilderIOManager {
6062 model: model,
6163 apiKey: apiKey,
6264 url: resolvedUrl,
63- locale: " " ,
65+ locale: locale ,
6466 preview: " "
6567 ) {
6668 return . success( content)
You can’t perform that action at this time.
0 commit comments