1) As a linguist, I do not believe that it would be very hard to simulate language, especially in the context that I have seen in my Dwarf Fortress years. There is a file in your game which acts as an index, which can be seen
here [DF wiki]. You can go ahead and edit the languages as you see fit.
As for the algorithm, by the looks of it, I think that fortress names and group names are a series of strings that you give meaning to. The computer just picks bits and pieces and assembles them together. Or are you referencing something specific? (More on algorithms below)
2) What you are witnessing here is called
emergent game play wikipedia. The idea is that the game runs algorithms upon algorithms to produce a lifelike simulation. Everything is made by statistical chance, and through the
RAWS DF wiki. These RAWS are the building blocks that the generational algorithms use. Then, the rest is purely "magic" because it all functions together, or shows a semblance of functioning (there are gaps, and we all see and know them. But we accept that they are there). The algorithm for world creation is explained
here aigamedev, and you can find more information on it through Google searching.
Several things you must understand about Toady is that, last time I checked, he is a genius-level mathematician who loves stories. Writing and creating these things is not hard for him. He also stated once that the source code for Dwarf Fortress is not public because he fears someone using it to create a spinoff that would inevitably ruin Dwarf Fortress. That being said, if you post questions and are truly curious, I bet that between his/his brothers responses or the help of the forums, you could find some form of an answer.