net.sf.okapi.common.filters

## Class LocalizationDirectives

- java.lang.Object
- - net.sf.okapi.common.filters.LocalizationDirectives

-     public class LocalizationDirectives
      extends java.lang.Object

  Processes localization directives.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocalizationDirectives()` Creates a new LocalizationDirectives object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isLocalizable(boolean popSingle)` Indicates if the current context is localizable or not.
    `boolean` | `isWithinScope()` Indicates if the current context is inside the scope of a localization directive.
    `boolean` | `localizeOutside()` Indicates if text outside the scope of localization directives should be extracted or not.
    `void` | `process(java.lang.String content)` Evaluates a string that contain localization directives and update the object state based on the given instructions.
    `void` | `reset()` Resets this localization directives processor.
    `void` | `setOptions(boolean useLD, boolean localizeOutside)` Sets the options for this localization directives processor.
    `boolean` | `useLD()` Indicates if localization directives are to be used or not.

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

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

- - ### Constructor Detail

    - #### LocalizationDirectives

          public LocalizationDirectives()

      Creates a new LocalizationDirectives object.

  - ### Method Detail

    - #### reset

          public void reset()

      Resets this localization directives processor.

    - #### useLD

          public boolean useLD()

      Indicates if localization directives are to be used or not.
      Returns:
        True if localization directives should be processed, false if they should not.

    - #### localizeOutside

          public boolean localizeOutside()

      Indicates if text outside the scope of localization directives should be extracted or not.
      Returns:
        True if text text outside the scope of localization directives is to be extracted, false if it should not.

    - #### isWithinScope

          public boolean isWithinScope()

      Indicates if the current context is inside the scope of a localization directive.
      Returns:
        True if the current context is inside the scope of a localization directive, false if it is outside.

    - #### isLocalizable

          public boolean isLocalizable(boolean popSingle)

      Indicates if the current context is localizable or not.
      Parameters:
        `popSingle` - Indicates if non-group directives should be popped out of the context when calling this method.
      Returns:
        True if the current context is localizable, or if localization directives are not to be used.

    - #### setOptions

          public void setOptions(boolean useLD,
                                 boolean localizeOutside)

      Sets the options for this localization directives processor.
      Parameters:
        `useLD` - Indicates if localization directives are to be used or not.
        `localizeOutside` - Indicates if text outside the scope of localization directives should be extracted or not.

    - #### process

          public void process(java.lang.String content)

      Evaluates a string that contain localization directives and update the object state based on the given instructions.
      Parameters:
        `content` - The text to process.