Skip to content

Commit f4d12fd

Browse files
committed
added locale for columns
1 parent 530f07f commit f4d12fd

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Sources/BuilderIO/Components/BuilderColumns.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@ struct BuilderColumns: BuilderViewProtocol {
5151
}
5252
}
5353
}
54+
55+
if let locale = block.locale {
56+
57+
for columnIndex in decodedColumns.indices {
58+
for blockIndex in decodedColumns[columnIndex].blocks.indices {
59+
decodedColumns[columnIndex].blocks[blockIndex]
60+
.setLocaleRecursively(locale)
61+
}
62+
}
63+
}
5464

5565
self.columns = decodedColumns
5666

Sources/BuilderIO/ExportedView/BuilderIOContentView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ public struct BuilderIOContentView: View {
1818
self.url = nil
1919
self._locale = locale // Initialize the binding
2020
_viewModel = State(wrappedValue: BuilderIOViewModel(locale: locale.wrappedValue))
21-
2221
}
2322

2423
public init(url: String, model: String = "page", locale: String) {

0 commit comments

Comments
 (0)