public class DefaultSoyMsgBundleResolver extends java.lang.Object implements SoyMsgBundleResolver
| Constructor and Description |
|---|
DefaultSoyMsgBundleResolver() |
| Modifier and Type | Method and Description |
|---|---|
protected com.google.template.soy.msgs.SoyMsgBundle |
createSoyMsgBundle(java.util.Locale locale)
An implementation that using a ContextClassLoader iterates over all urls it finds
based on a messagePath and locale, e.g.
|
java.lang.String |
getMessagesPath() |
boolean |
isFallbackToEnglish() |
boolean |
isHotReloadMode() |
com.google.common.base.Optional<com.google.template.soy.msgs.SoyMsgBundle> |
resolve(com.google.common.base.Optional<java.util.Locale> locale)
Based on a provided locale return a SoyMsgBundle file.
|
void |
setFallbackToEnglish(boolean fallbackToEnglish) |
void |
setHotReloadMode(boolean hotReloadMode) |
void |
setMessagesPath(java.lang.String messagesPath) |
public com.google.common.base.Optional<com.google.template.soy.msgs.SoyMsgBundle> resolve(com.google.common.base.Optional<java.util.Locale> locale)
throws java.io.IOException
resolve in interface SoyMsgBundleResolverlocale - java.io.IOException - in case there is an i/o error reading msg bundleprotected com.google.template.soy.msgs.SoyMsgBundle createSoyMsgBundle(java.util.Locale locale)
throws java.io.IOException
locale - java.io.IOExceptionpublic void setMessagesPath(java.lang.String messagesPath)
public void setHotReloadMode(boolean hotReloadMode)
public void setFallbackToEnglish(boolean fallbackToEnglish)
public java.lang.String getMessagesPath()
public boolean isHotReloadMode()
public boolean isFallbackToEnglish()