It's not a customer code, like Boeing does, (36 for BAW), as there are too many airlines with them, even new airlines getting them fresh so to speak.
The 211 version, quite simply is:
(the first 2) the 200 version,
(the middle 1) engine manufacturer, 0: General Electric, 1: CFM International, 2: Pratt and Whitney, 3: IAE International Aero Engine, 4: Rolls Royce.
(and the last 1) what type of engine it has: -211 CFM56-5A1; -212 CFM56-5A3; -214 CFM56-5B3/P.
So an A340-211 is a -200 with CFM56-5A1s........I think. Still leaves me with the X models though!!!