I’m planning on using IP geolocation to get the user’s country and then display the site in spanish or english without changing the domain.
How do I handle SEO?
Will search engines index both versions of my site? will people from latin america be able to find the spanish version?
You have several options. Which ever you choose: Do not rely on setting a cookie, because Google will simply ignore it and will only get pages in your default language. Google actually needs any kind of signal inside your URL that specifies the language.
1) Use sub domains like en., de., fr.* etc. When a new user arrives, make a redirect to the corresponding sub domain. However, I assume you include sub domains in your statement of not changing the domain.
2) Use language dependent prefixes in your url patterns like so:
/en/blog/, /de/blog/, /fr/blog/ and so on.
Or for your homepage use /de/, /fr/, /en/
New in Django 1.4: i18n URL patters
3) An alternative approach is using get parameters like Google does: /blog/?hl=en or /blog/?hl=fr. This approach easily gets messy.
As for your homepage “/”, make a redirect to the corresponding language, no matter if you choose prefixes or get params.
My personal choice is mostly suggestion number two. You may take a look how we do it on Pixabay.com – one of our projects using i18n URL patterns.