private void initializeCategoryTranslation ( ) { flatCategoriesLst . forEach ( category -> { translationServiceProperty ( ) . addListener ( ( observable , oldValue , newValue ) -> { category . translate ( newValue ) ; // listen for i18n changes in the TranslationService for this Category newValue . addListener ( ( ) -> category . translate ( newValue ) ) ; } ) ; } ) ; }
Sets up a binding of the TranslationService on the model so that the Category s title gets translated properly according to the TranslationService used .