You could put that in the template, although I don’t think that’s an actual code snippet.
I’d guess your site structure would need to look like this:
- English site
-- Homepage
-- Blog
--- Article 1
--- Article 2
-- Contact
- German site
-- Hauptseite
-- Etwas interessants
--- Ersten artikel
--- Zweiten artikel
-- Kontact
etc
I think that snippet of code uses two templates (at least), one for every language. You make the template variable in which you put the ID of the translated resource (under the different resource) and then you use something like Sylvaticus posted.
Something like this should work, assuming you named your TV "translatedResourceId":
[[*translatedResourceId:notempty=`<a href="[[~[[*translatedResourceId]]]]" title="View in other language">View in other language</a>`]]
There are, arguably, better solutions available, however this may be the easiest one.
Most other solutions probably involve contexts, and I find them quite daunting to start with.