Interface ITranslateCallback

  • All Known Implementing Classes:
    TranslateEntry

    public interface ITranslateCallback
    Callback for translate files.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getTranslation​(java.lang.String id, java.lang.String source)
      Old call without path, for compatibility
      java.lang.String getTranslation​(java.lang.String id, java.lang.String source, java.lang.String path)
      Get translation for output to compiled target.
      void linkPrevNextSegments()
      This method called from AbstractFilter if filter require second pass.
      void setPass​(int pass)
      Set current pass number Any filter called in one-pass mode by default.
    • Method Detail

      • setPass

        void setPass​(int pass)
        Set current pass number Any filter called in one-pass mode by default. But if it require second pass for support prev/next segments, it can set flag 'needSecondPass'.
        Parameters:
        pass - The current path number, i.e., 1 or 2
      • linkPrevNextSegments

        void linkPrevNextSegments()
        This method called from AbstractFilter if filter require second pass. It links prev/next segments for multiple translations.
      • getTranslation

        java.lang.String getTranslation​(java.lang.String id,
                                        java.lang.String source,
                                        java.lang.String path)
        Get translation for output to compiled target.
        Parameters:
        id - ID in source file, or null if ID not supported by format
        source - source entry text
        path - path of segment
        Returns:
        translation or null if translation not exist
      • getTranslation

        java.lang.String getTranslation​(java.lang.String id,
                                        java.lang.String source)
        Old call without path, for compatibility
        Parameters:
        id - ID in source file, or null if ID not supported by format
        source - source entry text
        Returns:
        translation or null if translation not exist