ios icon indicating copy to clipboard operation
ios copied to clipboard

Add Localizable.strings

Open sarahsnow1 opened this issue 8 years ago • 0 comments
trafficstars

We should support localized strings and make sure they are imported into client applications using Cocoapods

Updating the .podspec file to include:

cs.ios.resource_bundle = { 'MapzenSdk' => 'localization/*' }

Properly brings in all .lproj/ and files into a client application however localized strings don't seem to be a part of either the main bundle or the mapzen framework bundle:

var attribution = NSLocalizedString("attribution", comment: "Mapzen Attribution")
    if attribution == "attribution" {
      let bundles = Bundle.allFrameworks.filter({ (bundle) -> Bool in
        return bundle.bundlePath.contains("Mapzen")
      })
      let bundle = bundles.first
      if bundle != nil {
        attribution = NSLocalizedString("attribution", tableName: "Localizable.strings", bundle: bundle!, value: "value", comment: "Mapzen Attribution")
      }
    }

sarahsnow1 avatar Mar 01 '17 21:03 sarahsnow1