[ticket/12383] Expect strings and arrays as values of language array

This will make sure that we expect both types. Arrays as values will be
properly formatted according to their type.

Ticket: https://tracker.phpbb.com/browse/PHPBB3-12383

PHPBB3-12383