PIP 5.9.0
Platform-Independent Primitives
Loading...
Searching...
No Matches
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.