Ich kenne einen Hund, der sprechen kann.
Ich kenne einen Hund, der kann sprechen.
Why are these two sentences, which mean the same, idiomatic in the two different word orders?
Ich kenne einen Hund, der sprechen kann.
Ich kenne einen Hund, der kann sprechen.
Why are these two sentences, which mean the same, idiomatic in the two different word orders?
The difference between your two example sentences is: the first one is a "Hauptsatz" (main sentence?) with a "Relativsatz". The second one is a succession of (two) main sentences.
Let us start with the first one: the Relativsatz works like an Adjektiv for the Objekt of the main sentence:
Main sentence: [Ich (Subjekt)] [kenne (Prädikat)] [einen Hund (Objekt)].
The Objekt could contain one or more Adjektive to further describe its properties:
Ich kenne [einen großen, grünen, einbeinigen (, ...) Hund].
Instead of (or in addition to) these Adjektive there can be one or more Relativsätze, which act alike. They also describe further properties - ones which are too complex to have a single word for it:
Ich kenne einen [großen (Adjektiv)] Hund, [der sprechen kann (Relativsatz)].
Notice that in Relativsätzen the verb (here: "können"/"kann") always goes last.
Let us get to the second sentence: This is simply a list of two main sentences. The comma is there to separate the two. There are other possible means of separating such (lists of) main sentences: "und", "oder", "aber", and so on. It would also be possible to separate them by a full stop:
Ich kenne einen Hund, der kann sprechen.
Ich kenne einen Hund. Der kann sprechen.
I forego the exact analysis for the first part (see above), the second sentence parses out like this:
[Der (Subjekt) [kann sprechen (Prädikat)].
Words like "können" (there is also "müssen", "dürfen", "lassen", "mögen", ...) are so-called "Modalverben", which modify another verb, which is attached in Infinitv. For instance:
Der kann sprechen.
Der spricht.
Ich kenne einen Hund, der sprechen kann. "Der" is used as a relative pronoun -> Nebensatz -> verb at the end. Translation: I know a dog that can speak.
Ich kenne einen Hund, der kann sprechen. "Der" is used as a demonstrative pronoun (like "dieser") -> Hauptsatz https://studyflix.de/deutsch/demonstrativpronomen-3437 I know a dog, that/this one can speak.
Be careful, "der" has different meanings!
Regarding: Another example: Ich weiss nicht, was soll es bedeuten. vs. Ich weiss nicht, was es bedeuten soll. – First one: Ich weiß [es] nicht. Was soll es bedeuten? Second one: Ich weiß nicht, was es bedeuten soll.
Assuming you are an English native speaker, you have probably never thought about:
I want to know! Who is he? I want to know who he is.
As you can see, exactly the same structure as in German. All of a sudden, the verb has to be at the end. :)
In the first example the words in the Nebensatz are all more or less same weighted when someone reads the sentence. In the second example the last word can be more emphasized. Which would make the speaking dog in the first sentence something thats more or less normal and appears like that in nature. But the second sentence has the potential to emphasize that weirdness a little more. Nevertheless, both are correct. It is just a little game with the weight of different words in sentences.
Your second example is actually wrong, or grammatically not very pretty. The first sentence "Ich weiss nicht, was soll es bedeuten." wouldn't be used as it sounds weird and is overly complicated in providing its message.