WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class Localizer - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class Localizer

    Represents a class that contains localizer that provides localized access to string resources specific from the assembly manifest Syncfusion.Windows.Forms.Localization.SR.resources. Can be used from any assembly, resources will be loaded from the calling assembly.

    Inheritance
    System.Object
    Localizer
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Forms.Localization
    Assembly: Syncfusion.Edit.Windows.dll
    Syntax
    public class Localizer

    Constructors

    Localizer()

    Declaration
    public Localizer()

    Fields

    DEF_PROMPT_INDEX

    ID of the localizable string with "{0} of {1}" format.

    Declaration
    [StrLocalized("ContextPromptIndexFormat")]
    public static string DEF_PROMPT_INDEX
    Field Value
    Type Description
    System.String

    Methods

    GetEnumNames(Assembly, CultureInfo, Type)

    Gets localized names of the enum.

    Declaration
    protected static string[] GetEnumNames(Assembly assembly, CultureInfo culture, Type enumType)
    Parameters
    Type Name Description
    System.Reflection.Assembly assembly

    Calling assembly.

    System.Globalization.CultureInfo culture

    Culture to be used for getting localized version of the resource.

    System.Type enumType

    Type of the enum.

    Returns
    Type Description
    System.String[]

    Array of item names in enumeration.

    GetEnumNames(Type)

    Gets localized names of the enum.

    Declaration
    public static string[] GetEnumNames(Type enumType)
    Parameters
    Type Name Description
    System.Type enumType

    Type of the enum.

    Returns
    Type Description
    System.String[]

    Array of item names in enumeration.

    GetEnumValue(Type, String)

    Gets native name of the enum value.

    Declaration
    public static object GetEnumValue(Type enumType, string localizedName)
    Parameters
    Type Name Description
    System.Type enumType

    Enum type.

    System.String localizedName

    Localized name of the item.

    Returns
    Type Description
    System.Object

    Native name of the enum value.

    GetEnumValueName(Type, Object)

    Gets localized name of the enum value.

    Declaration
    public static string GetEnumValueName(Type enumType, object value)
    Parameters
    Type Name Description
    System.Type enumType

    Enumeration type.

    System.Object value

    Enum value.

    Returns
    Type Description
    System.String

    Enum value localized name.

    GetNativeEnumValueName(Type, String)

    Gets native name of the enum value.

    Declaration
    public static string GetNativeEnumValueName(Type enumType, string localizedName)
    Parameters
    Type Name Description
    System.Type enumType

    Enum type.

    System.String localizedName

    Localized name of the item.

    Returns
    Type Description
    System.String

    Native name of the enum value.

    GetObject(CultureInfo, String)

    Get localized version of the object.

    Declaration
    public static object GetObject(CultureInfo culture, string name)
    Parameters
    Type Name Description
    System.Globalization.CultureInfo culture
    System.String name

    Name of the localized resource.

    Returns
    Type Description
    System.Object

    Localized version of the object.

    GetObject(Assembly, CultureInfo, String)

    Get localized version of the object.

    Declaration
    protected static object GetObject(Assembly asm, CultureInfo culture, string name)
    Parameters
    Type Name Description
    System.Reflection.Assembly asm

    Calling assembly.

    System.Globalization.CultureInfo culture

    Culture to be used for getting localized version of the resource.

    System.String name

    Name of the localized resource.

    Returns
    Type Description
    System.Object

    Localized version of the object.

    GetString(Assembly, CultureInfo, String)

    Get localized version of the string.

    Declaration
    protected static string GetString(Assembly asm, CultureInfo culture, string name)
    Parameters
    Type Name Description
    System.Reflection.Assembly asm

    Calling assembly.

    System.Globalization.CultureInfo culture

    Culture to be used for getting localized version of the resource.

    System.String name

    Name of the localized resource.

    Returns
    Type Description
    System.String

    Localized version of the string.

    GetString(String)

    Get localized version of the string.

    Declaration
    public static string GetString(string name)
    Parameters
    Type Name Description
    System.String name

    Name of the localized resource.

    Returns
    Type Description
    System.String

    Localized version of the string.

    LocalizeFields(Type, Object)

    Loads values for all instance or static fields of the class that have StrLocalized attribute.

    Declaration
    public static void LocalizeFields(Type localizerType, object instance)
    Parameters
    Type Name Description
    System.Type localizerType

    Type to be localized.

    System.Object instance

    Type instance to be localized. If null, static fields of class will be localized.

    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved