# PhraseInContextEditorPostProcessor

The PhraseInContextEditorPostProcessor class is the main point of the i18next Phrase In-Context Editor Post Processor library and the only place where Phrase (opens new window)-specific logic happens. Implements PostProcessor i18n type (opens new window).

# Constructor

constructor( options: PhraseInContextEditorOptions )


options argument is assigned to the component using config setter

# Properties

  • # config: PhraseConfig

  • # phraseEnabled: boolean - property controlling the status of the In-Context Editor. Propagates the change to globalThis.PHRASEAPP_ENABLED.

# Methods

  • interpolateKey( key: string, ): string[]

  • process( value: string, keys: string[], options: unknown, translator: unknown, ): string


If the In-Context Editor is not yet loaded, changing phraseEnabled to true will trigger loading of the minified js source of the In-Context Editor.


Whenever disabled, the i18next Phrase In-Context Editor Post Processor will stop interpolating keys - this will revert back to the regular i18next (opens new window) behavior. For more information on how the formatters are being handled, please head to the introduction.

# PhraseInContextEditorOptions

Partial type of the PhraseConfig with only 2 properties required: phraseEnabled and projectId.

# PhraseConfig

Type describing all possible Phrase In-Context Editor config options.

phraseEnabled: boolean;
baseUrl: string;
profileUrl: string;
apiBaseUrl: string;
oauthEndpointUrl: string;
helpUrl: string;
logoUrl: string;
stylesheetUrl: string;
version: string;
priorityLocales: string[];
projectId: string;
branch: string;
ajaxObserver: boolean;
debugMode: boolean;
prefix: string = '{{__';
suffix: string = '__}}';
autoLowercase: boolean;
forceLocale: boolean;
loginDialogMessage: string;
useOldICE: boolean;
autoLogin: {
    perform: boolean;
    email: string;
    password: string;
sso: {
    enabled: boolean;
    enforced: boolean;
    provider: string;
    identifier: string;
fullReparse: boolean = true;