Optimized generated translation function for inner objects