core/play/src/main/java/play/i18n/Lang.java
public static Lang forCode(String code) {
    try {
      return new Lang(play.api.i18n.Lang.apply(code));
    } catch (Exception e) {
      return null;
    }
  }
public static Lang forCode(String code) {
    try {
      return new Lang(play.api.i18n.Lang.apply(code));
    } catch (Exception e) {
      return null;
    }
  }
public static Lang forCode ( String code ) { try { return new Lang ( play . api . i18n . Lang . apply ( code ) ) ; } catch ( Exception e ) { return null ; } }
Create a Lang value from a code (such as fr or en-US).

@param code the language code
@return the Lang for the code, or null of no matching lang was found.
Create a Lang value from a code ( such as fr or en - US ) .