Skip to content

merge override #80

@jonhargett

Description

@jonhargett

Would it be possible to add a merge option to use translations in translation2 to override the translations in translation1?
For instance, if you have 2 po files:

# default.po
msgid "unit"
msgstr "Unit"

# override.po
msgid "unit"
msgstr "Use this instead"

$translations = gt\Translations::fromPoFile($path . '/' . $lang . '/LC_MESSAGES/default.po');
$domainTranslation = gt\Translations::fromPoFile($path . '/' . $lang . '/LC_MESSAGES/override.po');
$translations->mergeWith($domainTranslation, gt\Translations::MERGE_OVERRIDE);

The idea here is that within each language, there would be a default translation and then another translation file that could override some of the msg strings.

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