public String getLocalizedResource ( String namespace , String resourceId ) throws Exception { String resourceValue = "" ; Class r = Class . forName ( namespace + "$string" ) ; Field f = r . getField ( resourceId ) ; resourceValue = getCurrentActivity ( ) . getResources ( ) . getString ( f . getInt ( f ) ) ; return resourceValue ; }
Returns a string for a resourceId in the specified namespace