コードは次のとおりです。
関数tform1.getlocaleinformation(flag:integer):string;
var
PCLCA:charの配列[0..20]。
始める
if(getLocaleInfo(locale_system_default、flag、pclca、19)<= 0)から始まります
PCLCA [0]:=#0;
終わり;
結果:= PCLCA;
終わり;
手順tform1.button1click(sender:tobject);
始める
showmessage(getlocaleinformation(locale_senglanguage));
終わり;
パラメーター「フラグ」は、次の値を取得できます。
locale_nouseroverride {ユーザーオーバーライドを使用しないでください}
locale_use_cp_acp {システムACPを使用}
locale_ilanguage {言語コード}
locale_slanguage {ローカル言語名}
locale_senglanguage {言語の英語名}
locale_sabbrevlangname {言語名の略語}
locale_snativelangname {ローカル言語名}
locale_icountry {国コード}
locale_scountry {国名}
locale_sengcountry {国の英語名}
locale_sabbrevctryname {国名略語}
locale_snativectryname {国名}
locale_idefaultlanguage {デフォルト言語コード}
locale_idefaultcountry {デフォルトの国コード}
locale_idefaultcodepage {デフォルトOEMコードページ}
locale_idefaultansicodepage {デフォルトANSIコードページ}
locale_idefaultmaccodepage {デフォルトMacページ}
locale_slist {リストアイテムスプリッター}
locale_imeasure {測定単位0 =メーター、1 =英語}
locale_sdecimal {小数点記号}
locale_shousand {サウザンドディバイダー}
locale_sgrouping {digitグループ化}
locale_idigits {分数数字の数}
locale_ilzero {10進数のリーディングゼロ}
locale_inegnumber {負のモード}
locale_snativedigits {ネイティブASCII 0-9}
locale_scurrency {ローカル通貨シンボル}
locale_sintlsymbol {国際通貨シンボル}
locale_smondecimalsep {通貨小数スプリッター}
locale_smonthousandsep {通貨サウザンドディバイダー}
locale_smongrouping {monetaryグループ化}
locale_icurrdigits {#ローカル通貨桁}
locale_iintlcurrdigits {#intl通貨桁}
locale_icurrency {プラス通貨モード}
locale_inegcurr {負の通貨モード}
locale_sdate {日付スプリッター}
locale_stime {timeスプリッター}
locale_sshortdate {short date string}
locale_slongdate {long date string}
locale_stimeformat {時間形式文字列}
locale_idate {短い日付形式の注文}
locale_ildate {長い日付形式の注文}
locale_itime {時間形式仕様}
locale_itimemarkposn {時間マーカーの位置}
locale_icentury {Century Format Specifier(Short Date)}
locale_itlzero {時代のフィールドでのリーディングゼロ}
locale_idaylzero {日中のゼロをリードする(短い日付)}
locale_imonlzero {月のフィールドの主要なゼロ(短い日付)}
locale_s1159 {amデザイナー}
locale_s2359 {PMデザイナー}
locale_icalendartype {カレンダー仕様のタイプ}
locale_ioptionalcalendar {追加のカレンダータイプ仕様}
locale_ifirstdayofweek {週の初日仕様}
locale_ifirstweekofyear {年の最初の週の仕様}
locale_sdayname1 {月曜日の長い名前}
locale_sdayname2 {火曜日の長い名前}
locale_sdayname3 {水曜日の長い名前}
locale_sdayname4 {木曜日の長い名前}
locale_sdayname5 {金曜日の長い名前}
locale_sdayname6 {土曜日の長い名前}
locale_sdayname7 {日曜日の長い名前}
locale_sabbrevdayname1 {月曜日の略語}
locale_sabbrevdayname2 {火曜日の略語}
locale_sabbrevdayname3 {水曜日の略語}
locale_sabbrevdayname4 {木曜日の略語}
locale_sabbrevdayname5 {金曜日の略語}
locale_sabbrevdayname6 {土曜日の略語}
locale_sabbrevdayname7 {日曜日の略語}
locale_smonthname1 {1月の長い名前}
locale_smonthname2 {2月の長い名前}
locale_smonthname3 {3月の長い名前}
locale_smonthname4 {4月の長い名前}
locale_smonthname5 {5月の長い名前}
locale_smonthname6 {6月の長い名前}
locale_smonthname7 {7月の長い名前}
locale_smonthname8 {8月の長い名前}
locale_smonthname9 {9月の長い名前}
locale_smonthname10 {10月の長い名前}
locale_smonthname11 {11月の長い名前}
locale_smonthname12 {12月の長い名前}
locale_smonthname13 {13か月目の長い名前(存在する場合)}
locale_sabbrevmonthname1 {1月の略語}
locale_sabbrevmonthname2 {2月略語}
locale_sabbrevmonthname3 {3月の略語}
locale_sabbrevmonthname4 {4月の略語}
locale_sabbrevmonthname5 {may略語}
locale_sabbrevmonthname6 {6月の略語}
locale_sabbrevmonthname7 {7月の略語}
locale_sabbrevmonthname8 {8月の略語}
locale_sabbrevmonthname9 {9月の略語}
locale_sabbrevmonthname10 {10月の略語}
locale_sabbrevmonthname11 {11月の略語}
locale_sabbrevmonthname12 {12月の略語}
locale_sabbrevmonthname13 {13の略語(もしあれば)}
locale_spositivesign {肯定的な符号}
locale_snegivatisign {minus sign}
locale_ipossignposn {正の位置}
locale_inegsignposn {minus position}
locale_ipossymprecedes {mon symがpos amtの前に}
locale_ipossepbyspace {mon sym sep by pos amt}
locale_inegsymprecedes {mon symはneg amtの前に}
locale_inegsepbyspace {mon sym sep by space from neg amt}
locale_fontsignature {font signature}
locale_siso639langname {ISO略語言語名}
locale_siso3166ctryName {ISO略語国名}