Click or drag to resize
LocalizableString Class
Data type used for strings in Spring configuration files that may need to be localized.
Inheritance Hierarchy
SystemObject
  Sdl.Core.GlobalizationLocalizableString

Namespace: Sdl.Core.Globalization
Assembly: Sdl.Core.Globalization (in Sdl.Core.Globalization.dll) Version: 1.8.0.0 (1.8.2687.0)
Syntax
public class LocalizableString

The LocalizableString type exposes the following members.

Constructors
  NameDescription
Public methodLocalizableString
Create from a literal string or resource identifier.
Top
Properties
  NameDescription
Public propertyContent
Returns the localized text this string represents.
Public propertyIsResource
true if the localizable text is retrieved from an assembly.
Public propertyRawContent
Returns the string or resource ID this localizable string uses to get the localized text.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns the localized text this string represents.
(Overrides ObjectToString.)
Top
Remarks

If this object is constructed from a plain text string it works like a normal System.String.

To reference a resource ID, create this object from a resource identifier string, in the following format: resource://[AssemblyPath\AssemblyName]/[resource ID], where [AssemblyPath\AssemblyName] is the name of the base assembly (with optional path) that the string resource is located in and [resource ID] is the ID of the string resource from which the localized string should be loaded.

The ResourceManager is used to load the string from the assembly, so a localized version of the string (depending on the current thread locale) should be returned if available.

See Also
Community
Edit

Be the first to Edit the community content of this topic.
Comments