public final class SoyMsgBundleWithFullLocale extends SoyMsgBundle
EMPTY| Modifier and Type | Method and Description |
|---|---|
SoyMsgBundle |
getInnerSoyMsgBundle() |
com.ibm.icu.util.ULocale |
getLocale()
Returns the
ULocale of this message bundle. |
String |
getLocaleString()
Gets the language/locale string of this bundle of messages.
|
SoyMsg |
getMsg(long msgId)
Retrieves a message by its unique message id.
|
com.google.common.collect.ImmutableList<SoyMsgPart> |
getMsgParts(long msgId)
Returns the message parts, or an empty array if there is no such message.
|
int |
getNumMsgs()
Gets the number of messages in this bundle.
|
boolean |
isRtl()
Returns
true if this is an RTL (right-to-left) locale. |
Iterator<SoyMsg> |
iterator()
Returns an iterator over all the messages.
|
static SoyMsgBundle |
preservingLocaleIfAllowed(SoyMsgBundle bundle,
Locale locale)
Returns a soy message bundle that exposes `locale` as its locale IF `locale` corresponds to the
same language as `bundle.getLocale()`.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic static SoyMsgBundle preservingLocaleIfAllowed(SoyMsgBundle bundle, Locale locale)
Examples
public String getLocaleString()
SoyMsgBundlegetLocaleString in class SoyMsgBundlepublic com.ibm.icu.util.ULocale getLocale()
SoyMsgBundleULocale of this message bundle. Subclasses are encouraged to override this
to provide efficient implementations.getLocale in class SoyMsgBundlepublic boolean isRtl()
SoyMsgBundletrue if this is an RTL (right-to-left) locale. Subclasses are encouraged to
override this to provide efficient implementations.isRtl in class SoyMsgBundlepublic SoyMsg getMsg(long msgId)
SoyMsgBundlegetMsg in class SoyMsgBundlemsgId - The message id of the message to retrieve.public com.google.common.collect.ImmutableList<SoyMsgPart> getMsgParts(long msgId)
SoyMsgBundleThis is useful for rendering only usecases when the rest of the SoyMsg doesn't
matter. The default implementation is just SoyMsg.getParts() but some subclasses may have
more efficient implementations
getMsgParts in class SoyMsgBundlepublic int getNumMsgs()
SoyMsgBundlegetNumMsgs in class SoyMsgBundlepublic Iterator<SoyMsg> iterator()
SoyMsgBundleiterator in interface Iterable<SoyMsg>iterator in class SoyMsgBundlepublic SoyMsgBundle getInnerSoyMsgBundle()