As you are leaving Canalave City (on route 218) there is a patch of grass just outside the city, you must use the Poke Radar in that grass, and some grass will wiggle. Every now and again there is a slight chance that a ditto will battle you. (12%)
It's not very common, and can take some times to find.
>In Pokemon Diamond, Ditto can be found at Route 218 with Poké Radar having 12% of rarity!
This also works for Pearl but not for Platinum.
Source - Serebii
Hope this helps!