I've seen both versions on the Internet. Maybe only one is the correct version? Maybe both?
日本語が話しません is ungrammatical. It sounds very unnatural. The following is the summary of what is OK and what is not:
- 私は日本語を話しません: OK
- 私は日本語は話しません: OK
- 私は日本語が話しません: Wrong!
- 私は日本語を話せません: OK
- 私は日本語は話せません: OK
- 私は日本語が話せません: OK
話す is a transitive verb (like English "speak"), so basically its object must be marked with を. But there are several exceptions you have to consider.
私は日本語を話しません means "I don't speak Japanese". 日本語が話しません is unnatural because this が is the subject marker, so it means "Japanese language doesn't speak". However 日本語は話しません make sense.
This usage of は is the contrastive-marker function. The difference of が and は is already explained in this. What's the difference between wa (は) and ga (が)?