Skip to content

How to print string translation from object created by MO loader #240

@jasomdotnet

Description

@jasomdotnet

Hi,
I have been able to load translation.mo with MO loader. Now, how to print translation of string from object created by MO loader, something like:

echo $translations->gettext('Hello world!', 'optional-textdomain');

With my current knowledge I was not able to figure out from documentation. Is it possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions