@@ -31,6 +31,7 @@ class NoCodesConfig internal constructor(
3131 internal val screenCustomizationDelegate : ScreenCustomizationDelegate ? ,
3232 internal val purchaseDelegate : PurchaseDelegate ? ,
3333 internal val purchaseDelegateWithCallbacks : PurchaseDelegateWithCallbacks ? ,
34+ internal val locale : String? ,
3435) {
3536
3637 /* *
@@ -55,6 +56,7 @@ class NoCodesConfig internal constructor(
5556 private var logLevel = LogLevel .Info
5657 private var logTag = DEFAULT_LOG_TAG
5758 private var customFallbackFileName: String? = null
59+ private var locale: String? = null
5860
5961 /* *
6062 * Provide a delegate to be notified about the no-code screens events.
@@ -157,6 +159,18 @@ class NoCodesConfig internal constructor(
157159 this .customFallbackFileName = fileName
158160 }
159161
162+ /* *
163+ * Set a custom locale for No-Code screens localization.
164+ * If set, this locale will take priority over the system default locale.
165+ * The locale should be in standard format (e.g., "en", "en-US", "de", "de-DE").
166+ *
167+ * @param locale the custom locale code.
168+ * @return builder instance for chain calls.
169+ */
170+ fun setLocale (locale : String ): Builder = apply {
171+ this .locale = locale
172+ }
173+
160174 /* *
161175 * Generate [NoCodesConfig] instance with all the provided configurations.
162176 * This method also validates some of the provided data.
@@ -182,6 +196,7 @@ class NoCodesConfig internal constructor(
182196 screenCustomizationDelegate,
183197 purchaseDelegate,
184198 purchaseDelegateWithCallbacks,
199+ locale,
185200 )
186201 }
187202 }
0 commit comments