nslocale

    0熱度

    1回答

    Crashlytics服務報告中的一些碰撞(約30墜毀/ 18的用戶爲1000屆) 這裏我的代碼: var brutDate: String = "" brutDate <- map["send_date"] let dateFormatter = NSDateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss" da

    1熱度

    4回答

    我想使用NSLocale顯示基於國家或國家/地區代碼的貨幣符號我擁有所有國家/地區名稱列表。假設我已經選擇美國然後返回$貨幣 代碼: NSLocale *locale = [NSLocale currentLocale]; NSString *countryCode = [locale objectForKey: NSLocaleCountryCode]; NSString *country

    1熱度

    2回答

    我想基於NSLocale將輸入爲NSString的數字轉換爲NSDecimalNumber。 例如 InputString => 110.50 Current Locale => en_FI Expected output => 110.50 Actual output => 110 InputString => 110.50 Current Locale => en_US Expe

    33熱度

    4回答

    請幫助我們瞭解如何使用NSLocale在Swift 3中獲取國家代碼? 這是我以前使用的代碼。 NSLocale.currentLocale().objectForKey(NSLocaleCountryCode) as! String 我可以在斯威夫特3.獲得語言代碼如下 Locale.current.languageCode! 正如我所看到的,取語言代碼是直線前進,但COUNTRYCOD

    -1熱度

    2回答

    我的代碼: NSString *dateStr = @"03-02-2017";//[responseObject objectForKey:@"event_date"]; NSLog(@"'%@'", dateStr); // Convert string to date object NSDateFormatter *dateFormat = [[NSDateFo

    0熱度

    1回答

    我正在製作網絡瀏覽器,當我連接到Wi-Fi網絡時,一切正常。當我使用的是3G連接距離只有短短的10分鐘,他的iPhone調試會話我發現了兩個錯誤: 下面的代碼會拋出異常: [[NSLocale currentLocale] languageCode] 的WKWebView不加載任何東西。 有一種錯誤的發生: _BSMachError: (os/kern) invalid capability

    1熱度

    2回答

    我想弄清楚系統的首選語言,我已經放在系統的首選項中。我希望Locale.preferredLanguages或Locale.current可以工作,但不幸的是,它似乎只返回應用程序捆綁軟件中也支持的那些語言。

    0熱度

    1回答

    我試圖從NSLocale打印一些基本的相關信息檢索NSLocale .scriptCode的值,但我沒能得到一個值從.scriptCode財產回來。 目前,相關的位 let localeIdent = NSLocale.autoupdatingCurrent.identifier let userLocale = NSLocale(localeIdentifier: localeIdent)

    1熱度

    1回答

    我的應用程序中有兩種語言版本(英文,中文)。當用戶點擊「更改語言」按鈕時,我想將按鈕語言文本更改爲這些語言。 例如, btnLogOut.setTitle(NSLocalizedString("Logout", comment: ""), for: .normal) 在中國的語言,文字不能完全顯示。所以,我想在按鈕文字翻譯成中文時改變字體大小。 我不想改變英文版的字體大小。默認的字體大小爲這個

    1熱度

    3回答

    我迅速2我所用的波紋管代碼獲取systemLocale: let systemLocaleCountryCode = NSLocale.systemLocale().objectForKey(NSLocaleCountryCode) as? String ,但現在我在SWIFT 3,我收到了波紋管錯誤: cannot call value of non function type locale