Skip to content

Add utility conditions for language and country tags #42

@bgaillard

Description

@bgaillard

As explained in the http://docs.pushwoosh.com/docs/createmessage documentation it is possible to specify Country and Language conditions.

For example.

"conditions": [["Country", "EQ", "BR"],["Language", "EQ", "pt"]]

It would be useful to have 2 new conditions names CountryCondition and LanguageCondition with utility constants for country codes (i.e ISO_3166-2) and language codes (i.e ISO-639-1).

Here is a sample.

CountryCondition::create()->eq(CountryCode::FR);
LanguageCondition::create()->noteq(LanguageCode::GB);

The CountryCondition and LanguageCondition classes are specific StringCondition which do not allow to specify the name of the tag.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions