Wearing T shirt with writings or flags on it is permissible providing that these flags have no crosses on them or animals. Also, it is not permissible to have flags or names of countries that are not Muslims as our allegiance should be to Muslims only. Wearing their names would not be appropriate for a Muslim to do.