com.intellectualsites.translation

## Class YamlTranslationFile

- java.lang.Object
- - com.intellectualsites.translation.TranslationFile
  - - com.intellectualsites.translation.YamlTranslationFile

-     public class YamlTranslationFile
      extends TranslationFile

  The YAML implementation of TranslationFile Relies heavily on SnakeYAML

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `YamlTranslationFile(java.io.File path, TranslationLanguage language, java.lang.String name, TranslationManager manager)` Constructor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(java.lang.String key, java.lang.String value)` Add a translation
    `YamlTranslationFile` | `fancyHeader(java.lang.String... header)` Set a fancy header
    `TranslationLanguage` | `getLanguage()` Get the translation language
    `org.yaml.snakeyaml.Yaml` | `getYaml()` Get the YAML object
    `YamlTranslationFile` | `header(java.lang.String... header)` Set the header
    `YamlTranslationFile` | `read()` Read the file
    `void` | `reload()` Reload
    `void` | `saveFile()` Save the file

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### YamlTranslationFile

          public YamlTranslationFile(java.io.File path,
                             TranslationLanguage language,
                             java.lang.String name,
                             TranslationManager manager)

      Constructor
      Parameters:
        `path` - save path
        `language` - translation language
        `name` - project name

  - ### Method Detail

    - #### reload

          public void reload()

      Reload

    - #### header

          public YamlTranslationFile header(java.lang.String... header)

      Set the header
      Parameters:
        `header` - Comment header
      Returns:
        instance

    - #### fancyHeader

          public YamlTranslationFile fancyHeader(java.lang.String... header)

      Set a fancy header
      Parameters:
        `header` - Comment header
      Returns:
        instance

    - #### add

          public void add(java.lang.String key,
                 java.lang.String value)

      Add a translation
      Specified by:
        `add` in class `TranslationFile`
      Parameters:
        `key` - translation name
        `value` - translation value

    - #### getLanguage

          public TranslationLanguage getLanguage()

      Get the translation language
      Specified by:
        `getLanguage` in class `TranslationFile`
      Returns:
        language

    - #### saveFile

          public void saveFile()

      Save the file
      Specified by:
        `saveFile` in class `TranslationFile`

    - #### getYaml

          public org.yaml.snakeyaml.Yaml getYaml()

      Get the YAML object
      Returns:
        yaml object with correct settings

    - #### read

          public YamlTranslationFile read()

      Read the file
      Specified by:
        `read` in class `TranslationFile`
      Returns:
        instance