CultureInfo.IsNeutralCulture プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > CultureInfo.IsNeutralCulture プロパティの意味・解説 

CultureInfo.IsNeutralCulture プロパティ

現在の CultureInfo がニュートラル カルチャを表しているかどうかを示す値を取得します

名前空間: System.Globalization
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Overridable ReadOnly
 Property IsNeutralCulture As Boolean
Dim instance As CultureInfo
Dim value As Boolean

value = instance.IsNeutralCulture
public virtual bool IsNeutralCulture { get;
 }
public:
virtual property bool IsNeutralCulture {
    bool get ();
}
/** @property */
public boolean get_IsNeutralCulture ()
public function get IsNeutralCulture
 () : boolean

プロパティ
現在の CultureInfoニュートラル カルチャを表している場合trueそれ以外場合false

解説解説

ニュートラル カルチャは、国や地域ではなく言語関連付けられているカルチャです。特定のカルチャは、1 つ言語、および 1 つの国または地域関連付けられたカルチャです。たとえば、"fr" はニュートラル カルチャであり、"fr-FR" は特定のカルチャです。"zh-CHS" (簡体字中国語) および "zh-CHT" (繁体字中国語) はニュートラル カルチャです。

このプロパティfalse返す場合、カルチャは特定カルチャかインバリアント カルチャです。

使用例使用例

次に示すのは、中国語使用するカルチャのうち、どれがニュートラル カルチャであるかを調べコード例です。

Imports System
Imports System.Globalization

Public Class SamplesCultureInfo

   Public Shared Sub Main()

      ' Lists the cultures that use the Chinese language and determines
 if each is a neutral culture.
      Dim ci As CultureInfo
      For Each ci In  CultureInfo.GetCultures(CultureTypes.AllCultures)
         If ci.TwoLetterISOLanguageName = "zh"
 Then
            Console.Write("{0,-6} {1,-40}", ci.Name,
 ci.EnglishName)
            If ci.IsNeutralCulture Then
               Console.WriteLine(": neutral")
            Else
               Console.WriteLine(": specific")
            End If
         End If
      Next ci

   End Sub 'Main 

End Class 'SamplesCultureInfo


'This code produces the following output.
'
'zh-CHS Chinese (Simplified)                    : neutral
'zh-TW  Chinese (Taiwan)                        : specific
'zh-CN  Chinese (People's Republic of China)    : specific
'zh-HK  Chinese (Hong Kong S.A.R.)              : specific
'zh-SG  Chinese (Singapore)                     : specific
'zh-MO  Chinese (Macao S.A.R.)                  : specific
'zh-CHT Chinese (Traditional)                   : neutral

using System;
using System.Globalization;

public class SamplesCultureInfo  {

   public static void Main()
  {

      // Lists the cultures that use the Chinese language and determines
 if each is a neutral culture.
      foreach ( CultureInfo ci in CultureInfo.GetCultures(
 CultureTypes.AllCultures ) )  {
         if ( ci.TwoLetterISOLanguageName == "zh" )
  {
            Console.Write( "{0,-6} {1,-40}", ci.Name, ci.EnglishName );
            if ( ci.IsNeutralCulture )  {
               Console.WriteLine( ": neutral" );
            }
            else  {
               Console.WriteLine( ": specific" );
            }
         }
      }

   }

}


/*
This code produces the following output.

zh-CHS Chinese (Simplified)                    : neutral
zh-TW  Chinese (Taiwan)                        : specific
zh-CN  Chinese (People's Republic of China)    : specific
zh-HK  Chinese (Hong Kong S.A.R.)              : specific
zh-SG  Chinese (Singapore)                     : specific
zh-MO  Chinese (Macao S.A.R.)                  : specific
zh-CHT Chinese (Traditional)                   : neutral

*/
using namespace System;
using namespace System::Globalization;
int main()
{
   
   // Lists the cultures that use the Chinese language and determines
 if each is a neutral culture.
   System::Collections::IEnumerator^ enum0 = CultureInfo::GetCultures( CultureTypes::AllCultures
 )->GetEnumerator();
   while ( enum0->MoveNext() )
   {
      CultureInfo^ ci = safe_cast<CultureInfo^>(enum0->Current);
      if ( ci->TwoLetterISOLanguageName->Equals( "zh"
 ) )
      {
         Console::Write( "{0,-6} {1,-40}", ci->Name, ci->EnglishName
 );
         if ( ci->IsNeutralCulture )
         {
            Console::WriteLine( ": neutral" );
         }
         else
         {
            Console::WriteLine( ": specific" );
         }
      }
   }
}

/*
This code produces the following output.

zh-CHS Chinese (Simplified)                    : neutral
zh-TW  Chinese (Taiwan)                        : specific
zh-CN  Chinese (People's Republic of China)    : specific
zh-HK  Chinese (Hong Kong S.A.R.)              : specific
zh-SG  Chinese (Singapore)                     : specific
zh-MO  Chinese (Macao S.A.R.)                  : specific
zh-CHT Chinese (Traditional)                   : neutral

*/
import System.* ;
import System.Globalization.* ;

public class SamplesCultureInfo
{  
    public static void main(String[]
 args)
    {
        // Lists the cultures that use the Chinese language and determines
 if 
        // each is a neutral culture.
        for(int iCtr=0;
            iCtr < (CultureInfo.GetCultures(CultureTypes.AllCultures).length);
            iCtr++) {
            CultureInfo ci = 
                CultureInfo.GetCultures(CultureTypes.AllCultures)[iCtr];
            if (ci.get_TwoLetterISOLanguageName().equalsIgnoreCase("zh"))
 {
                Console.Write("{0,-6} {1,-40}", ci.get_Name(), 
                    ci.get_EnglishName());
                if (ci.get_IsNeutralCulture()) {
                    Console.WriteLine(": neutral");
                }
                else {
                    Console.WriteLine(": specific");
                }
            }
        }
    } //main
} //SamplesCultureInfo

/*
This code produces the following output.

zh-CHS Chinese (Simplified)                    : neutral
zh-TW  Chinese (Taiwan)                        : specific
zh-CN  Chinese (People's Republic of China)    : specific
zh-HK  Chinese (Hong Kong S.A.R.)              : specific
zh-SG  Chinese (Singapore)                     : specific
zh-MO  Chinese (Macau S.A.R.)                  : specific
zh-CHT Chinese (Traditional)                   : neutral
*/
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CultureInfo クラス
CultureInfo メンバ
System.Globalization 名前空間
CultureInfo.InvariantCulture プロパティ


このページでは「.NET Framework クラス ライブラリ リファレンス」からCultureInfo.IsNeutralCulture プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からCultureInfo.IsNeutralCulture プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からCultureInfo.IsNeutralCulture プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「CultureInfo.IsNeutralCulture プロパティ」の関連用語

CultureInfo.IsNeutralCulture プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



CultureInfo.IsNeutralCulture プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS