Skip to content

LocalizedStringProperty

Under Construction

This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/chipper/blob/main/js/browser/LocalizedStringProperty.ts for the most up-to-date information.

Overview

The main Property for a translated string (subtyped so we can get the stringKey, or other things in the future).

@author Jonathan Olson <jonathan.olson>

Class LocalizedStringProperty

import { LocalizedStringProperty } from 'scenerystack/chipper';

Constructor

new LocalizedStringProperty( localizedString : LocalizedString, tandem : Tandem, metadata? : Record<string, unknown> )

Instance Methods

getTranslatedStringProperty( locale : Locale ) : TProperty<string>

Returns a translation-specific Property for the given locale. This Property will not change when the localeProperty (current locale) changes, but instead will only change during translation updates, stringTests, etc.

Source Code

See the source for LocalizedStringProperty.ts in the chipper repository.