AppleScript名:Current Localeから各種情報を取得する |
— Created 2016-10-12 by Takaaki Naganoya — 2016 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" set curLocale to current application’s NSLocale’s currentLocale() set aDS1 to curLocale’s objectForKey:(current application’s NSLocaleDecimalSeparator) –> (NSString) "." set aDS2 to curLocale’s objectForKey:(current application’s NSLocaleGroupingSeparator) –> (NSString) "," set aDS3 to curLocale’s objectForKey:(current application’s NSLocaleCurrencySymbol) –> (NSString) "¥" set aDS4 to curLocale’s objectForKey:(current application’s NSLocaleCurrencyCode) –> (NSString) "JPY" set aDS5 to curLocale’s objectForKey:(current application’s NSLocaleCollatorIdentifier) –> (NSString) "ja-JP" set aDS6 to curLocale’s objectForKey:(current application’s NSLocaleQuotationBeginDelimiterKey) –> (NSString) "「" set aDS7 to curLocale’s objectForKey:(current application’s NSLocaleQuotationEndDelimiterKey) –> (NSString) "」" set aDS8 to curLocale’s objectForKey:(current application’s NSLocaleAlternateQuotationBeginDelimiterKey) –> (NSString) "『" set aDS9 to curLocale’s objectForKey:(current application’s NSLocaleAlternateQuotationEndDelimiterKey) –> (NSString) "』" set aDS10 to curLocale’s objectForKey:(current application’s NSLocaleIdentifier) –> (NSString) "ja_JP" set aDS11 to curLocale’s objectForKey:(current application’s NSLocaleLanguageCode) –> (NSString) "ja" set aDS12 to curLocale’s objectForKey:(current application’s NSLocaleCountryCode) –> (NSString) "JP" set aDS13 to curLocale’s objectForKey:(current application’s NSLocaleScriptCode) –> missing value set aDS14 to curLocale’s objectForKey:(current application’s NSLocaleVariantCode) –> missing value set aDS15 to curLocale’s objectForKey:(current application’s NSLocaleExemplarCharacterSet) –> (__NSCFCharacterSet) <__NSCFCharacterSet: 0x60800124d890> set aDS16 to curLocale’s objectForKey:(current application’s NSLocaleCalendar) –> (_NSCopyOnWriteCalendarWrapper) <_NSCopyOnWriteCalendarWrapper: 0x610000232ca0> set aDS17 to curLocale’s objectForKey:(current application’s NSLocaleCollationIdentifier) –> missing value set aDS18 to curLocale’s objectForKey:(current application’s NSLocaleUsesMetricSystem) –> (NSNumber) 1 set aDS19 to curLocale’s objectForKey:(current application’s NSLocaleMeasurementSystem) –> (NSString) "Metric" |
More from my site
(Visited 48 times, 1 visits today)