Pure-PHP tools for language tag manipulation