Code works only for a rewrite url /en/ schema and should work for any plugin with a same problem, although not tested.
Code kazi tu kwa schema rewrite url / sw / na wanapaswa kufanya kazi kwa Plugin yoyote na tatizo moja, ingawa si kipimo .