Translate (Apache Ant API)
Keywords: org.apache.tools.ant.taskdefs.optional.i18n.Translate class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tools.ant.taskdefs.optional.i18n
Class Translate

    java.lang.Object
      org.apache.tools.ant.ProjectComponent
          org.apache.tools.ant.Task
              org.apache.tools.ant.taskdefs.MatchingTask
                  org.apache.tools.ant.taskdefs.optional.i18n.Translate

All Implemented Interfaces:
  SelectorContainer

public class Translate
extends MatchingTask

Translates text embedded in files using Resource Bundle files.

Author:
  Magesh Umasankar

Field Summary

Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
`fileset, useDefaultExcludes`

Fields inherited from class org.apache.tools.ant.Task
`description, location, target, taskName, taskType, wrapper`

Fields inherited from class org.apache.tools.ant.ProjectComponent
`project`

Constructor Summary
`Translate()`

Method Summary
`void` | `addFileset(FileSet set)` Adds a set of files to translate as a nested fileset element.
`void` | `execute()` Check attributes values, load resource map and translate
`void` | `setBundle(java.lang.String bundle)` Sets Family name of resource bundle; required.
`void` | `setBundleCountry(java.lang.String bundleCountry)` Sets locale specific country of resource bundle; optional.
`void` | `setBundleEncoding(java.lang.String bundleEncoding)` Sets Resource Bundle file encoding scheme; optional.
`void` | `setBundleLanguage(java.lang.String bundleLanguage)` Sets locale specific language of resource bundle; optional.
`void` | `setBundleVariant(java.lang.String bundleVariant)` Sets locale specific variant of resource bundle; optional.
`void` | `setDestEncoding(java.lang.String destEncoding)` Sets destination file encoding scheme; optional.
`void` | `setEndToken(java.lang.String endToken)` Sets ending token to identify keys; required.
`void` | `setForceOverwrite(boolean forceOverwrite)` Whether or not to overwrite existing file irrespective of whether it is newer than the source file as well as the resource bundle file.
`void` | `setSrcEncoding(java.lang.String srcEncoding)` Sets source file encoding scheme; optional, defaults to encoding of local system.
`void` | `setStartToken(java.lang.String startToken)` Sets starting token to identify keys; required.
`void` | `setToDir(java.io.File toDir)` Sets Destination directory; required.

Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask
`addAnd, addContains, addCustom, addDate, addDepend, addDepth, addFilename, addMajority, addNone, addNot, addOr, addPresent, addSelector, addSize, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems`

Methods inherited from class org.apache.tools.ant.Task
`getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorFlush, handleErrorOutput, handleFlush, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName`

Methods inherited from class org.apache.tools.ant.ProjectComponent
`getProject`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Translate

    public Translate()

Method Detail

### setBundle

    public void setBundle(java.lang.String bundle)

  Sets Family name of resource bundle; required.

### setBundleLanguage

    public void setBundleLanguage(java.lang.String bundleLanguage)

  Sets locale specific language of resource bundle; optional.

### setBundleCountry

    public void setBundleCountry(java.lang.String bundleCountry)

  Sets locale specific country of resource bundle; optional.

### setBundleVariant

    public void setBundleVariant(java.lang.String bundleVariant)

  Sets locale specific variant of resource bundle; optional.

### setToDir

    public void setToDir(java.io.File toDir)

  Sets Destination directory; required.

### setStartToken

    public void setStartToken(java.lang.String startToken)

  Sets starting token to identify keys; required.

### setEndToken

    public void setEndToken(java.lang.String endToken)

  Sets ending token to identify keys; required.

### setSrcEncoding

    public void setSrcEncoding(java.lang.String srcEncoding)

  Sets source file encoding scheme; optional, defaults to encoding of local system.

### setDestEncoding

    public void setDestEncoding(java.lang.String destEncoding)

  Sets destination file encoding scheme; optional. Defaults to source file encoding

### setBundleEncoding

    public void setBundleEncoding(java.lang.String bundleEncoding)

  Sets Resource Bundle file encoding scheme; optional. Defaults to source file encoding

### setForceOverwrite

    public void setForceOverwrite(boolean forceOverwrite)

  Whether or not to overwrite existing file irrespective of whether it is newer than the source file as well as the resource bundle file. Defaults to false.

### addFileset

    public void addFileset(FileSet set)

  Adds a set of files to translate as a nested fileset element.

### execute

    public void execute()
                 throws BuildException

  Check attributes values, load resource map and translate

  Overrides:
    `execute` in class `Task`
  Throws:
    `BuildException` - if something goes wrong with the build

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.