Since you are looking at playing it in VLC, I would suggest using MKVToolNix. It's a free, open-source set of tools to allow you to manipulate MKVs.
Let's go through it step-by-step (there is a shorter way but this will get you to learn a bit more about MKVTN):
- You're going to want to demux two of the videos with the foreign audio so drag it in to MKVTN's "Source Files" area. You'll see the file get listed and in the "Tracks, chapters, tags and attachments" view you will see the streams in that file. In my example below (forgive the Windows interface, but it's the same) you will see there is an AAC audio stream and an Mpeg-4 Hi10p video stream.
- Deselect all tracks so that only the audio track you want to grab is selected.
- You'll notice that the filename under "Output file" has changed its extension to
.mka. This is because MKVTN knows we are exporting only audio. Choose where you want to save the output file, give it a name, and click "Start muxing".
Repeat this process until you have the video file with one audio and separate
.mka files for each of the foreign audio tracks.
Repeat step one, dragging in the original video file containing the first language.
Drag in the separate
.mka tracks to the same view. You will be presented with a popup like below.
Since we want to use these files as input files too, we can leave the settings as they are and click "OK".
In the "Tracks" view, you should now see multiple audio tracks for each of the different languages. (At this point I should note that you could have just dragged the video files all in and then just deselected the video tracks but I figured I'd get you to dummy run the program first ;) )
If you're happy with not having any other metadata set for the file then you can go ahead and repeat step 3 (setting the file name etc.) to export an
.mkv containing all your audio with the video.
If you'd like to though, you can select each track in the "Tracks" view and specify the language of each and also which one should play by default by editing the attributes in the "Properties" view. This can help you differentiate later on in VLC when you want to switch the languages.
You may also find that if the audio files are different lengths and just stretched in their original containers that the audio may not sync up perfectly. You can adjust that via the "Properties" tab too if you know the offsets. If the source video was the same though, you may find it syncs up fine.
AFAIK, there's no similar tool for iOS, but it's not something I've thought of doing on iOS myself.
Let me know in the comments if there's something you want me to expand on. :)