Sodium abundances in stellar atmospheres with differing metallicities