I translate into neutral Spanish. There are many Spanish dialects and it would be impossible to translate every book, article, etc into all different Spanish dialects. Neutral Spanish is free of slang and localisms and is used and understood in every Latin American country, in USA and in Spain. It is the equivalent to what happens in English. What you hear in the language spoken in UK, Australia or South Africa is definitely different than the English you might hear spoken in New York. However, when books are published, newspapers are printed, or news is broadcast, it is done in a language that can clearly be understood by the entire English-speaking population of the world.
This is what wikipedia says:
In the television market, Latin America is considered as one territory for distribution and syndication of programmes; for this reason they are dubbed into a Neutral Spanish that avoids idioms and words that may have a coarse meaning in any of the countries in which the programme will be shown.
Another motivator for the unification of Spanish is the translation by multinational companies of manuals, software, websites, etc., from English to Spanish. It is easier to use a neutral version of Spanish than to create different versions for each country or region. If it were done by country, there would be over twenty versions, and if by region it would be difficult to define which countries belonged to which region, as well as being complicated from the logistical point of view. The result has been to identify a neutral Spanish, a version that tries to avoid regional phenomena, such as the Latin American voseo, or terms that may be identified with specific countries (for example, for “computer”, the term in Spain is ordenador, while in Spanish America the most frequent term is computadora, except in a few areas that prefer computador; as a result, Microsoft Windows uses the region-neutral term equipo). This neutral language is developed with the help of glossaries that prescribe the preferred terms and the terms to avoid.