Package com.jada.util

Examples of com.jada.util.GoogleTranslate.translate()


            form.setMetaKeywordsLangFlag(true);
            form.setMetaKeywordsLang(translator.translate(category.getCategoryLanguage().getMetaKeywords()));
            if (form.getCatShortTitleLang().length() > 20) {
              form.setCatShortTitleLang(form.getCatShortTitleLang().substring(0, 20));
            }
            form.setCatTitleLang(translator.translate(category.getCategoryLanguage().getCatTitle()));
            if (form.getCatTitleLang().length() > 40) {
              form.setCatTitleLang(form.getCatTitleLang().substring(0, 40));
            }
    }
   
View Full Code Here


      form.setContentShortDescLangFlag(true);
      form.setContentDescLangFlag(true);
      form.setPageTitleLangFlag(true);
      form.setMetaKeywordsLangFlag(true);
      form.setMetaDescriptionLangFlag(true);
      form.setContentTitleLang(translator.translate(content.getContentLanguage().getContentTitle()));
      form.setContentShortDescLang(translator.translate(content.getContentLanguage().getContentShortDesc()));
      form.setContentDescLang(translator.translate(content.getContentLanguage().getContentDesc()));
      form.setPageTitleLang(translator.translate(content.getContentLanguage().getPageTitle()));
      form.setMetaKeywordsLang(translator.translate(content.getContentLanguage().getMetaKeywords()));
      form.setMetaDescriptionLang(translator.translate(content.getContentLanguage().getMetaDescription()));
View Full Code Here

      form.setContentDescLangFlag(true);
      form.setPageTitleLangFlag(true);
      form.setMetaKeywordsLangFlag(true);
      form.setMetaDescriptionLangFlag(true);
      form.setContentTitleLang(translator.translate(content.getContentLanguage().getContentTitle()));
      form.setContentShortDescLang(translator.translate(content.getContentLanguage().getContentShortDesc()));
      form.setContentDescLang(translator.translate(content.getContentLanguage().getContentDesc()));
      form.setPageTitleLang(translator.translate(content.getContentLanguage().getPageTitle()));
      form.setMetaKeywordsLang(translator.translate(content.getContentLanguage().getMetaKeywords()));
      form.setMetaDescriptionLang(translator.translate(content.getContentLanguage().getMetaDescription()));
    }
View Full Code Here

      form.setPageTitleLangFlag(true);
      form.setMetaKeywordsLangFlag(true);
      form.setMetaDescriptionLangFlag(true);
      form.setContentTitleLang(translator.translate(content.getContentLanguage().getContentTitle()));
      form.setContentShortDescLang(translator.translate(content.getContentLanguage().getContentShortDesc()));
      form.setContentDescLang(translator.translate(content.getContentLanguage().getContentDesc()));
      form.setPageTitleLang(translator.translate(content.getContentLanguage().getPageTitle()));
      form.setMetaKeywordsLang(translator.translate(content.getContentLanguage().getMetaKeywords()));
      form.setMetaDescriptionLang(translator.translate(content.getContentLanguage().getMetaDescription()));
    }
    catch (Exception e) {
View Full Code Here

      form.setMetaKeywordsLangFlag(true);
      form.setMetaDescriptionLangFlag(true);
      form.setContentTitleLang(translator.translate(content.getContentLanguage().getContentTitle()));
      form.setContentShortDescLang(translator.translate(content.getContentLanguage().getContentShortDesc()));
      form.setContentDescLang(translator.translate(content.getContentLanguage().getContentDesc()));
      form.setPageTitleLang(translator.translate(content.getContentLanguage().getPageTitle()));
      form.setMetaKeywordsLang(translator.translate(content.getContentLanguage().getMetaKeywords()));
      form.setMetaDescriptionLang(translator.translate(content.getContentLanguage().getMetaDescription()));
    }
    catch (Exception e) {
      logger.error(e);
View Full Code Here

      form.setMetaDescriptionLangFlag(true);
      form.setContentTitleLang(translator.translate(content.getContentLanguage().getContentTitle()));
      form.setContentShortDescLang(translator.translate(content.getContentLanguage().getContentShortDesc()));
      form.setContentDescLang(translator.translate(content.getContentLanguage().getContentDesc()));
      form.setPageTitleLang(translator.translate(content.getContentLanguage().getPageTitle()));
      form.setMetaKeywordsLang(translator.translate(content.getContentLanguage().getMetaKeywords()));
      form.setMetaDescriptionLang(translator.translate(content.getContentLanguage().getMetaDescription()));
    }
    catch (Exception e) {
      logger.error(e);
        ActionMessages errors = new ActionMessages();
View Full Code Here

      form.setContentTitleLang(translator.translate(content.getContentLanguage().getContentTitle()));
      form.setContentShortDescLang(translator.translate(content.getContentLanguage().getContentShortDesc()));
      form.setContentDescLang(translator.translate(content.getContentLanguage().getContentDesc()));
      form.setPageTitleLang(translator.translate(content.getContentLanguage().getPageTitle()));
      form.setMetaKeywordsLang(translator.translate(content.getContentLanguage().getMetaKeywords()));
      form.setMetaDescriptionLang(translator.translate(content.getContentLanguage().getMetaDescription()));
    }
    catch (Exception e) {
      logger.error(e);
        ActionMessages errors = new ActionMessages();
        errors.add("error", new ActionMessage("error.google.translate"));
View Full Code Here

    Coupon coupon = (Coupon) em.find(Coupon.class, Format.getLong(form.getCouponId()));
    copyProperties(form, coupon);
   
      GoogleTranslate translator = new GoogleTranslate(form.getFromLocale(), form.getToLocale());
      form.setCouponNameLangFlag(true);
      form.setCouponNameLang(translator.translate(coupon.getCouponLanguage().getCouponName()));
 
    FormUtils.setFormDisplayMode(request, form, FormUtils.EDIT_MODE);
    ActionForward actionForward = actionMapping.findForward("success");
    return actionForward;
  }
View Full Code Here

          Menu menu = (Menu) em.find(Menu.class, Format.getLong(form.getMenuId()));
          initLanguageInfo(menu, form);
         
            GoogleTranslate translator = new GoogleTranslate(form.getFromLocale(), form.getToLocale());
            form.setMenuNameLangFlag(true);
            form.setMenuNameLang(translator.translate(menu.getMenuLanguage().getMenuName()));
        }
       
        FormUtils.setFormDisplayMode(request, form, FormUtils.EDIT_MODE);
        ActionForward actionForward = actionMapping.findForward("success");
        return actionForward;
View Full Code Here

          LangTranDetailForm langTranDetailForm = form.getLangTrans()[i];
          translationSource += langTranDetailForm.getLangTranEnglish() + "|";
    }
   
    GoogleTranslate translator = new GoogleTranslate("en", form.getGoogleTranslateLocale());
    String translationResult = translator.translate(translationSource);
   
    String tokens[] = translationResult.split("\\|");
   
    MessageResources resources = this.getResources(request);
    for (int i = 0; i < form.getLangTrans().length; i++) {
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.