Package org.olat.core.gui.translator

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


   
    List<UserPropertyHandler> userPropertyHandlers = UserManager.getInstance().getUserPropertyHandlersFor(
        ScoreAccountingHelper.class.getCanonicalName(), true);
    t = UserManager.getInstance().getPropertyHandlerTranslator(t);
    for (UserPropertyHandler propertyHandler : userPropertyHandlers) {
      tableHeader1.append(t.translate(propertyHandler.i18nColumnDescriptorLabelKey()));
      tableHeader1.append("\t");     
      tableHeader2.append("\t");
    }       

    // preload user properties cache
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

    if (addCallback != null) {
      FeedManager manager = FeedManager.getInstance();
      // Create a new podcast feed resource
      feedResource = manager.createPodcastResource();
      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

  public static String[] getAllRegisteredAndAlreadyTranslatedOperatorLabels(Locale l) {
    Translator t = new PackageTranslator(OperatorManager.class.getPackage().getName(), l);
    String[] tmp = new String[ops.size()];
    int i = 0;
    for (Operator o : ops) {
      tmp[i++] = t.translate(o.getLabelKey());
    }
    return tmp;
  }
 
  /**
 
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.