Package com.google.i18n.pseudolocalization.message

Examples of com.google.i18n.pseudolocalization.message.SimpleMessage


   *
   * @param text
   * @return localized text
   */
  public String localize(String text) {
    SimpleMessage message = new SimpleMessage(text);
    localize(message);
    return message.getText();
  }
View Full Code Here


    while ((ch = reader.read()) != -1) {
      buf.append((char) ch);
    }
    reader.close();
    List<Message> list = new ArrayList<Message>();
    list.add(new SimpleMessage(buf.toString()));
    messages = Collections.unmodifiableList(list);
    return new ReadableMessageCatalog() {
      public Iterable<Message> readMessages() {
        return messages;
      }
View Full Code Here

   * @return result
   * @throws PseudolocalizationException
   */
  protected String runPipeline(PseudolocalizationPipeline pipeline,
      List<MessageFragment> fragments) throws PseudolocalizationException {
    SimpleMessage msg = new SimpleMessage(fragments) { };
    pipeline.localize(msg);
    return msg.getText();
  }
View Full Code Here

   * @return result
   * @throws PseudolocalizationException
   */
  protected String runPreparsedHtml(PseudolocalizationPipeline pipeline)
      throws PseudolocalizationException {
    SimpleMessage msg = new SimpleMessage(Arrays.<MessageFragment>asList(
        new SimpleTextFragment("Hello "),
        new SimpleNonlocalizableTextFragment("<br>"),
        new SimpleTextFragment(" there"))) { };
    pipeline.localize(msg);
    return msg.getText();
  }
View Full Code Here

TOP

Related Classes of com.google.i18n.pseudolocalization.message.SimpleMessage

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.