Package org.olat.core.gui.translator

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


   * @param language
   * @return Link text used to display a link to switch to this authentication provider.
   */
  public String getLinktext(Locale locale) {
    Translator trans = getPackageTranslatorForLocale(locale);
    String text = trans.translate("authentication.provider.linkText");
    return text;
  }

  public Controller createController(UserRequest lureq, WindowControl lwControl) {
    AutoCreator ac = new AutoCreator();
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

      String[] metaDataFields = ArrayHelper.toArray(metaDataList);
      String[] metaDataFieldsTranslated = new String[metaDataFields.length];
      Translator metaTranslator = metadataProvider.createFieldsTranslator(getLocale());
      for (int i=0; i < metaDataFields.length; i++) {
        String key = metaDataFields[i];
        metaDataFieldsTranslated[i] = key + " (" + metaTranslator.translate(key) + ")";
      }
      metadataType = uifactory.addDropdownSingleselect("metadata_type", "form.search.label.metadatatype", formLayout, metaDataFields, metaDataFieldsTranslated, null);
      metadataQuery = uifactory.addTextElement("metadata_query", null, 255, "", formLayout);
    }
   
View Full Code Here

  public static MainLayoutController createLaunchController(RepositoryEntry re, String initialViewIdentifier, UserRequest ureq, WindowControl wControl) {
    if (re == null) return null;
    RepositoryManager rm = RepositoryManager.getInstance();
    if (!rm.isAllowedToLaunch(ureq, re)) {
      Translator trans = Util.createPackageTranslator(RepositoyUIFactory.class, ureq.getLocale());
      String text = trans.translate("launch.noaccess");
      Controller c = MessageUIFactory.createInfoMessage(ureq, wControl, null, text);
     
      // use on column layout
      LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(ureq, wControl, null, null, c.getInitialComponent(), null);
      layoutCtr.addDisposableChildController(c); // dispose content on layout dispose
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

    Locale userLocale = ureq.getLocale();
    String charset = UserManager.getInstance().getUserCharset(ureq.getIdentity());
    Translator trans = getPackageTranslator(userLocale);
    List<OrganisationalEntity> organisationalEntityList = getOrganisationalEntityList(areaList);
    return generateArchiveFile(context, owners, participants, waitings, columnList, organisationalEntityList,
        trans.translate("archive.areas"), archiveType, userLocale, charset);
  }
 
 
  /**
   * Creates an temp CSV (comma separated) file containing the members info
View Full Code Here

    Translator t = new PackageTranslator(OperatorManager.class.getPackage().getName(), locale);
    String[] tmp = new String[ops.size()];
    int i = 0;
    for (Operator o : ops) {
      if(keys.contains(o.getOperatorKey())) {
        tmp[i++] = t.translate(o.getLabelKey());
      }
    }
    return tmp;
  }
 
View Full Code Here

    Locale userLocale = ureq.getLocale();
    String charset = UserManager.getInstance().getUserCharset(ureq.getIdentity());
    Translator trans = getPackageTranslator(userLocale);
    List<OrganisationalEntity> organisationalEntityList = getOrganisationalEntityList(groupList);
    return generateArchiveFile(context, owners, participants, waitings, columnList, organisationalEntityList,
        trans.translate("archive.groups"), archiveType, userLocale, charset);
  }

  /**
   *
   * @param context
View Full Code Here

      List<String> columnList, List<OrganisationalEntity> organisationalEntityList, String orgEntityTitle, String archiveType,
      Locale userLocale, String charset) {
    //TODO: sort member lists
    File outFile = null;
    Translator trans = getPackageTranslator(userLocale);   
    String archiveTitle = trans.translate("archive.title") + ": " + DefaultContextTranslationHelper.translateIfDefaultContextName(context, trans);
    try {
    if (ALL_IN_ONE.equals(archiveType)) {
      //File tempDir = getTempDir();
      outFile = archiveAllInOne(context, owners, participants, waitings, archiveTitle, columnList, organisationalEntityList,
          orgEntityTitle, userLocale, ALL_IN_ONE_FILE_NAME_PREFIX, null, charset);
View Full Code Here

  }
 
  private void appendInternInfo(StringBuffer buf, String title, Locale userLocale) {
    Translator trans = getPackageTranslator(userLocale)
    buf.append(EOL);
    buf.append(trans.translate("archive.interninfo"));
    buf.append(EOL);
    buf.append(title);
    buf.append(EOL);
  }
 
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.