A foreign nationals can prove its integration by applying for nationality
Most states, at given conditions (such as minimum residence, period, crimnal record, knowledge of language) allows foreigners to apply for naturalisation.
This will provide the possibility to vote to everybody; the right to vote however should be conditioned to the fact that by naturalisation the foreign person is willing to accept the customs of rules of the country
Naturalisation in most countries is a lengthy process that requires fullfillment of several conditions and might be expensive.
Expatriates that plans to live in a country for a limited period of time, such as a few years, as in the case of a company transferee will be excluded.