public Translation get ( String locale ) { locale = locale . replace ( "-" , "_" ) ; Translation tr = translations . get ( locale ) ; if ( locale . contains ( "_" ) && tr == null ) tr = translations . get ( locale . substring ( 0 , 2 ) ) ; return tr ; }
Returns the Translation object for the specified locale and returns null if not found .