I'm not sure of a way to do this with Keyboard Maestro, however with Bartender this is easily accomplished.
Bartender lets your arrange and hide your menu bar items, and also allows you to show certain items only when a certain parameter has been met. For instance, I have mine set to show the Dropbox icon only when the icon changes from it's normal state to anything else (like the syncing icon). I have the same for Typinator; when the regular icon is in the menu bar it's hidden, but when expansions are paused and the icon changes, Bartender shows it for me.
So for the keyboard icon, you could have it set to show only when the icon does not match the English keyboard layout icon.
Let me know if you have any more questions about it. Perhaps somebody else knows of a way to do it with Keyboard Maestro or some scripting.