Package org.olat.core.gui.translator

Examples of org.olat.core.gui.translator.Translator.translate()


      private LayoutMain3ColsController columnLayoutCtr;

      @Override
      public void init(UserRequest ureq) {
        empty = new Panel("empty");      Translator translator = Util.createPackageTranslator(this.getClass(), ureq.getLocale());
        contentCtr = MessageUIFactory.createInfoMessage(ureq, getWindowControl(), translator.translate("status.currently.locked.title"), translator.translate("status.currently.locked"));
        listenTo(contentCtr); // auto dispose later
        Component resComp = contentCtr.getInitialComponent();

        columnLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), empty, empty, resComp, /*do not save no prefs*/null);
        listenTo(columnLayoutCtr); // auto dispose later
View Full Code Here


      private LayoutMain3ColsController columnLayoutCtr;

      @Override
      public void init(UserRequest ureq) {
        empty = new Panel("empty");      Translator translator = Util.createPackageTranslator(this.getClass(), ureq.getLocale());
        contentCtr = MessageUIFactory.createInfoMessage(ureq, getWindowControl(), translator.translate("status.currently.locked.title"), translator.translate("status.currently.locked"));
        listenTo(contentCtr); // auto dispose later
        Component resComp = contentCtr.getInitialComponent();

        columnLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), empty, empty, resComp, /*do not save no prefs*/null);
        listenTo(columnLayoutCtr); // auto dispose later
View Full Code Here

   * @return
   */
  public String getShortDescription(Locale locale) {
    Translator f = new PackageTranslator(fallbackTranslatorStr, locale);
    Translator t = new PackageTranslator(transPckg, locale, f);
    return t.translate(shortDesc, params);
  }

  public String getShortDescriptionKey() {
    return shortDesc;
  }
View Full Code Here

   * @return
   */
  public String getLongDescription(Locale locale) {
    Translator f = new PackageTranslator(fallbackTranslatorStr, locale);
    Translator t = new PackageTranslator(transPckg, locale, f);
    return t.translate(longDesc, params);
  }

  public String getLongDescriptionKey() {
    return longDesc;
  }
View Full Code Here

        // initialize some type specific stuff
        switch (type) {
        case 1:
            namesList = cgm.getUniqueLearningGroupNamesFromAllContexts();           
            main.contextPut("title", trans.translate("groupandareaselect.groups.title"));
            main.contextPut("noChoicesText", trans.translate("groupandareaselect.groups.nodata"));
            break;
        case 2:
            namesList = cgm.getUniqueAreaNamesFromAllContexts();           
            main.contextPut("title", trans.translate("groupandareaselect.areas.title"));
View Full Code Here

        // initialize some type specific stuff
        switch (type) {
        case 1:
            namesList = cgm.getUniqueLearningGroupNamesFromAllContexts();           
            main.contextPut("title", trans.translate("groupandareaselect.groups.title"));
            main.contextPut("noChoicesText", trans.translate("groupandareaselect.groups.nodata"));
            break;
        case 2:
            namesList = cgm.getUniqueAreaNamesFromAllContexts();           
            main.contextPut("title", trans.translate("groupandareaselect.areas.title"));
            main.contextPut("noChoicesText", trans.translate("groupandareaselect.areas.nodata"));
View Full Code Here

            main.contextPut("title", trans.translate("groupandareaselect.groups.title"));
            main.contextPut("noChoicesText", trans.translate("groupandareaselect.groups.nodata"));
            break;
        case 2:
            namesList = cgm.getUniqueAreaNamesFromAllContexts();           
            main.contextPut("title", trans.translate("groupandareaselect.areas.title"));
            main.contextPut("noChoicesText", trans.translate("groupandareaselect.areas.nodata"));
            break;
        default:
            throw new OLATRuntimeException("Must use valid type. type::" + type, null);
        }
View Full Code Here

            main.contextPut("noChoicesText", trans.translate("groupandareaselect.groups.nodata"));
            break;
        case 2:
            namesList = cgm.getUniqueAreaNamesFromAllContexts();           
            main.contextPut("title", trans.translate("groupandareaselect.areas.title"));
            main.contextPut("noChoicesText", trans.translate("groupandareaselect.areas.nodata"));
            break;
        default:
            throw new OLATRuntimeException("Must use valid type. type::" + type, null);
        }
       
View Full Code Here

    if (addCallback != null) {
      FeedManager manager = FeedManager.getInstance();
      // Create a new podcast feed resource
      feedResource = manager.createBlogResource();
      Translator trans = new PackageTranslator("org.olat.repository", ureq.getLocale());
      addCallback.setDisplayName(trans.translate(feedResource.getResourceableTypeName()));
      addCallback.setResourceable(feedResource);
      addCallback.setResourceName(manager.getFeedKind(feedResource));
      addCallback.finished(ureq);
    }
  }
View Full Code Here

   * @return Description text.
   */
  @SuppressWarnings("unchecked")
  public String getDescription(Locale locale) {
    Translator trans = getPackageTranslatorForLocale(locale);
    String desc = trans.translate("authentication.provider.description");
    return desc;
  }

  /**
   * [used by velocity]
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.