Soldiers take names from the various name files which can be customised, assuming any modifications are kept to the current convention then it's feasible to add nationality info where it just says the title of the name file chosen, Flags would be more tricky as that would have to be hard coded to display certain flag on certain nationality.
Most of the name pairings are fairly unique so it is possible to know the nationality from the name anyway though although some of the names are cultural rather then nation specific like Arabic and Hindi, although the latter is mainly one country the former has many nations. Could always change Hindi to Indian though and copy-paste Arabic for as many countries you want so you can have Egyptian, Saudi, Libyan etc...