Name format in custom module

I set default name format ā€œl f sā€. But in custom modules always show like ā€œf lā€.
If I change name format in profile or admin panel it is changed only in standart modules.
How to correct this?