.idx and .sub are only partially processed subtitles ripped from a DVD. To avoid confusion, at this stage the .sub file contains the information about the subtitle, but it usually can't be viewed properly; actually, I think it can't be viewed at all. The ripped subtitle then needs to be processed to a simple text code file which can, again, be a .sub file or .srt; or be used with some advanced programs to create a .ssa or .ass files (these can then easily be muxed into the video and a custom font).
So if you're trying to rip subtitles from a DVD, use VobSub
step1: DirectVobSub to extract .idx and .sub files and
step2: SubReSync to convert the subtitle images into simple text codes). It's a long process, depending on the size of the movie)
But, if you don't want to "waste" time doing it yourself, there are a lot of websites offering free subtitles in various languages (if the subtitle language was on a DVD, it has most certainly been ripped and posted somewhere on the internet)