Skip to content

setLanguage throws error with empty strings. #70

@adjenks

Description

@adjenks

This code:

$TALTranslator = new \PHPTAL_GetTextTranslator();
$TALTranslator->addDomain('mydomain', './locale');
$TALTranslator->useDomain('mydomain');
$TALTranslator->setLanguage('', 'en_US'); // Empty string as first argument

Will throw this exception:

Language(s) code(s) ", en_US" not supported by your system.

Looks like some sort of strange string concatenation problem as indicated by the leading comma in the list of languages in the error.

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