Package de.innovationgate.wgpublisher.lang

Examples of de.innovationgate.wgpublisher.lang.WebTMLLanguageChooser


    WGContentNavigator navigator = new WGContentNavigator(this.role, new WebTMLLanguageChooser(db(), this));
        return navigator.hasContentChildren(getcontent());
  }

  public boolean hassiblings() throws WGAPIException {
    WGContentNavigator navigator = new WGContentNavigator(this.role, new WebTMLLanguageChooser(db(), this));
        return navigator.getSiblingsCount(getcontent())!=0;
  }
View Full Code Here


   * @param exhaustive Set to true if the method should try to find a appropriate language even if the pref language was not yet set for the user session
   * @return The preferred language or null if none could be determined
   * @deprecated
   */
  protected String getpreferredlanguage(WGDatabase db, boolean exhaustive) {
        WebTMLLanguageChooser chooser = new WebTMLLanguageChooser(db, this);
        try {
            String lang = chooser.getPreferredLanguage(db);
            if (lang != null) {
                return lang;
            }
            else {
                return getmaincontext().content().getLanguage().getName();
View Full Code Here

     */
    public DateFormat getDateFormat(String pattern) {
       
        // Select language for language dependent date formats
        Locale locale = null;
        WGLanguageChooser chooser = new WebTMLLanguageChooser(db(), this);
        WGLanguage lang = null;
        try {
            lang = chooser.selectDatabaseLanguage(db());
            if (lang != null) {
                locale = lang.getLocale();
            }
        }
        catch (WGAPIException e) {
View Full Code Here

                  // second try - lookup file container in current context db
                  container = db().getFileContainer(containerName);
                 
                  if (container == null) {
                    // third try - use container name as key and try to find a content document
                    container = WGPDispatcher.getContentByAnyKey(containerName, db(), new WebTMLLanguageChooser(db(), this), isbrowserinterface());
                  }
                }
               
                if (container != null) {
                fileIn = container.getFileData(fileName);
View Full Code Here

        attachscaledimage(doc, scaler, null);
    }
 
  public TMLContext dbContext(WGDatabase dbTarget) throws WGAPIException {
     
      WebTMLLanguageChooser chooser = new WebTMLLanguageChooser(dbTarget, this);
      WGLanguage lang = chooser.selectDatabaseLanguage(dbTarget);
     
      // We want to create a db context even when there is no matching language
      // so we just create dummy content on the source context language
      if (lang == null) {
          lang = dbTarget.getLanguage(content().getLanguage().getName());
View Full Code Here

TOP

Related Classes of de.innovationgate.wgpublisher.lang.WebTMLLanguageChooser

Copyright © 2018 www.massapicom. 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.