PIP 5.6.1
Platform-Independent Primitives
Public Member Functions | List of all members
PIStringContextTr Class Reference

Context-aware string wrapper that automatically translates strings using PITranslator::tr(). Helper returned by operator""_tr for optional-context translation. More...

#include <pitranslator.h>

Public Member Functions

 PIStringContextTr (PIString &&s)
 Stores source string for later translation.
 
 operator PIString () const
 Translates stored string without explicit context.
 
PIString operator() (const PIString &ctx={}) const
 Translates stored string in context "ctx".
 

Detailed Description

Context-aware string wrapper that automatically translates strings using PITranslator::tr(). Helper returned by operator""_tr for optional-context translation.