The WordPress locale depends on the WPLANG
flag, this is found in your wp-config.php
file, try to check there, that it’s indeed set to Spanish.
WordPress does not try to get the system locale in any way, and depends on either the WPLANG
option or definition as stated above. However, there is a locale
filter that can be hooked to by other plugins which can set locale based on system locale. Search throughout your codebase for hooks to ‘locale’ to identify whether any plugin hijacked the locale or not. Alternatively disable all plugins and check again.
grep -rni 'add_filter' * | grep -rni 'locale' --color