public static final String getLString ( Class < ? > source , String label , Object ... params ) { final ResourceBundle rb = ResourceBundle . getBundle ( source . getCanonicalName ( ) ) ; String text = rb . getString ( label ) ; text = text . replaceAll ( "[\\n\\r]" , "\n" ) ; //$NON-NLS-1$ //$NON-NLS-2$ text = text . replaceAll ( "\\t" , "\t" ) ; //$NON-NLS-1$ //$NON-NLS-2$ text = MessageFormat . format ( text , params ) ; return text ; }
Read a resource property and replace the parametrized macros by the given parameters .