All Implemented Interfaces:
TagBase, GlobalAttributable, Serializable, Cloneable

public class Lang extends AbstractAttribute implements GlobalAttributable
The lang attribute specifies the language of the element's content.
Sample html :-
<p> This is a paragraph. </p>
<p lang="fr"> Ceci est un paragraphe. </p>
See Also:
  • Constructor Details

    • Lang

      public Lang()
    • Lang

      public Lang(String lang)
      Parameters:
      lang - eg: fr
    • Lang

      public Lang(Locale locale)
      Parameters:
      locale - eg: Locale.JAPAN
  • Method Details

    • init

      protected void init()
      invokes only once per object
      Since:
      1.0.0
    • setValue

      public void setValue(String lang)
      Parameters:
      lang - eg: fr
      Since:
      1.0.0
    • getValue

      public String getValue()
      Returns:
      the language name, eg: fr
      Since:
      1.0.0
    • getLocale

      public Locale getLocale()
      Returns:
      the corresponding locale for the language
      Since:
      1.0.0