ios - How can i present different webview based on localization? -


i have app want localize multiple languages. terms , conditions page web address, , each language support has different link.

in controller present web view, how can "localize" link, switch links based on locale?

to build off of randy's answer you'd want have following code site:

objective-c:

// getting url language nsstring *websitestring = nslocalizedstring(@"website", nil);  // calling said url [self.webview loadrequest:[nsurlrequest requestwithurl:[nsurl urlwithstring: websitestring]]]; 

swift:

// getting url language let websitestring = nslocalizedstring("website", comment: "language");  // calling said url uiwebview.loadrequest(webviewinstance)(nsurlrequest(url: nsurl(string: websitestring)!)) 

and in localizable.strings file language:

// "language" differ various supported languages "website" = "https://destination.com/language"; 

Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -