Added Translation class
Moved gatherTranslatableStrings() from lib.php to Translation::gatherTranslatableStrings()
Moved inline function $getTranslated() to Translation::getTranslated()
Removed sort($strings) as suggested by versh23
Moved inline $genContentTypes() to class function
Refined function comments
Removed $nstr, as is only counted up and never used otherwise
Moved code to new funtions scanTwig() and scanPhp()
Use getExtension() instead of pathinfo()
Replaced file_get_contents($file) with $file->getContents()
Split fields/relation name|label loop for beter readability
Commented member variable $app
Collect translatable strings in a member variable and add a function to set it
Make scanning twig/php files two own functions
Moved adding contenttype fields to own function
Moved adding contenttype relations to own function
Moved adding taxonomies to own function
Moved contenttypes list into function
Tweaked comments
Removed some unused foreach variables