nslocale - How to convert two letter currency code to base locale identifier on IOS -


i need convert 2 letter country code, default, native, identifier, e.g. tw > zh_tw not en_tw. > en_us. ru > ru_ru, not en_ru. isn't justg same 2 letters repeated. note, need country code, not language code. there simple way, using nslocale, or have have big list !?

thanks

shaun southern

nsstring *countrycode = @"ie";  nsdictionary *components = [nsdictionary dictionarywithobject:countrycode forkey:nslocalecountrycode];  id localeident = [nslocale localeidentifierfromcomponents:components];                         nslocale *locale = [[nslocale alloc] initwithlocaleidentifier:localeident]; 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -