Click or drag to resize

LocalisationService Class

Manages localisation
Inheritance Hierarchy
SystemObject
  UnityEngine.Object
    UnityEngine.Component
      UnityEngine.Behaviour
        UnityEngine.MonoBehaviour
          ImmerseSDKLoggingBehaviour
            ImmerseSDKSingletonBehaviour
              ImmerseSDK.LocalisationLocalisationService

Namespace:  ImmerseSDK.Localisation
Assembly:  ImmerseSDK.App (in ImmerseSDK.App.dll) Version: 3.9.0.0 (3.9.0.0)
Syntax
C#
public class LocalisationService : SingletonBehaviour

The LocalisationService type exposes the following members.

Constructors
  NameDescription
Private methodStatic memberLocalisationService
Public methodLocalisationService
Initializes a new instance of the LocalisationService class
Top
Properties
  NameDescription
Public propertyIsTestingLocalisation
Set this to true if you are testing the localisation in the app. This is cause all localised text to be replaced by "TEST". This allows you to very quickly see where there is text that is not localised.
Top
Methods
  NameDescription
Public methodAsNormalisedAscii(String)
Returns the string as a normalised ASCII string. Accents are converted to a normalised character, and all non-ascii parts are mapped to String.Empty.
Public methodStatic memberAsNormalisedAscii(String, Encoding)
Returns the string as a normalised ASCII string. Accents are converted to a normalised character, and all non-ascii parts are mapped to String.Empty.
Public methodChangeLocale
Change the current locale to the new specified one.
Public methodCoroutineInitialise
This method is used by our internal systems so do not call it directly.
(Overrides SingletonBehaviourCoroutineInitialise.)
Public methodGetLocalisedText
Returns a localised version of the text key passed in
Public methodGetLocalisedTextFormatted
Returns a localised version of the text key passed in
Public methodLoadCustomLocalisationFiles
Loads a set of custom localisation TSV files from a resource location.
Public methodMergeLocalisationData
Merge new localisation data into the current locale data table. Note: If the locale is changed, you will loose all these entries and you would need to add them again.
Protected methodOnDestroy
Unity component method
(Overrides SingletonBehaviourOnDestroy.)
Public methodTryGetLocalisedText
Returns a localised version of the text key passed in
Public methodTryGetLocalisedTextFormatted
Returns a localised version of the text key passed in
Top
Events
  NameDescription
Public eventOnLocaleChanged
Fired when the locale changes
Top
Fields
  NameDescription
Public fieldStatic memberFallbackLocale
Default locale is International English
Public fieldStatic memberTestModeString
The string that would be returned in case we are testing localisation
Top
Extension Methods
  NameDescription
Public Extension MethodGetCopyOf
Copies all properties of a component from source to target. Uses reflection to set properties.
(Defined by ComponentExtensions.)
Public Extension MethodWaitForT
Waits for a singleton on a coroutine
(Defined by SingletonManager.)
Top
See Also