You would have to change /library/XenForo/Route/Prefix/Forums.php and Threads.php to replace those in buildLink(). And then create 2 new routes in development admin for t and f to go to those files.
Or so you don't edit those files you could create your own classes for each of them, edit the routes to point to it instead. Extend the original classes and and do what I said above. Either way it needs coding.
Also I don't see why? The URLS are currently readable. Adding this stuff would make them less so?
Thanks very much for your answers! There are two reasons:
1. the words are not in my language. Having links with /форум/168 (serbia) is okay for all the audience in the world, but it is not as good as /forums/168 in your own language. It looks much more professional to have a system in one language. Users from my forum don't find it nice to have some parts not translated, there is also some older audience.
2. I could put a keyword inside these two links for seo reasons.
I don't know why you would change it from /threads/ to /t/ unless you have a fetish for short URLs, but it would certainly make sense to allow changing it, mainly for boards in other languages. If you have a board in Tok Pisin, then you may want to use the Tok Pisin word for threads instead of the English word.