diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a61dfd3..f314987a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ ## 24.7.8 +* Added support for localization of content blocks. + * Mitigated an issue where visibility could have been wrongly assigned if a view was closed while going to background. (Experimental!) * Mitigated an issue where the user provided URLSessionConfiguration was not applied to direct requests diff --git a/CountlyContentBuilderInternal.m b/CountlyContentBuilderInternal.m index ec0bbcb0..196edb8a 100644 --- a/CountlyContentBuilderInternal.m +++ b/CountlyContentBuilderInternal.m @@ -137,6 +137,11 @@ - (NSURLRequest *)fetchContentsRequest queryString = [CountlyConnectionManager.sharedInstance appendChecksum:queryString]; + NSArray *components = [CountlyDeviceInfo.locale componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"_-"]]; + + queryString = [queryString stringByAppendingFormat:@"&%@=%@", + @"la", components.firstObject]; + NSString* URLString = [NSString stringWithFormat:@"%@%@?%@", CountlyConnectionManager.sharedInstance.host, kCountlyEndpointContent,