"That is good, as long as it is true."
Translation:Das ist gut, sofern es stimmt.
Some conjuctions send the verb to the end of the sentence. These are called "subordinating conjunctions". You can find a list of them here: http://german.about.com/library/weekly/aa010910b.htm
"Das ist gut, solang es treu ist." this is not spot on, it means here faithful/trusty but not true, except otherwise implied through context, which is not given.
I would expect the following sentences for the meaning you imply.
Es/alles is gut, sofern du treu bist/bleibst. All is fine as long as you are faithful/trusty.
Other German examples:
Das ist gut, solange es richtig ist. "That is good, as long as it is correct."
Das ist gut, solange es wahr ist. "That is good, as long as it is true." (also logically true)
Das ist gut, sofern es stimmt. "That is good, as long as it sums up."
"Das ist gut, solang es treu ist."
It may work if you think "es" is your pet, and "das" is something you have talked about before about this pet. But I would not expect "true" in the English sentence but: faithful/trusty/loyal/devoted.