public final class BidiGlobalDir extends Object
Important: Do not use outside of Soy code (treat as superpackage-private).
| Modifier and Type | Field and Description |
|---|---|
static BidiGlobalDir |
LTR |
static BidiGlobalDir |
RTL |
| Modifier and Type | Method and Description |
|---|---|
static BidiGlobalDir |
forIsRtlCodeSnippet(String isRtlCodeSnippet,
SoyBackendKind backend)
Creates a bidi global direction that can only be determined at template runtime, by evaluating
a given source code snippet that yields a boolean value where true indicates rtl.
|
static BidiGlobalDir |
forStaticIsRtl(boolean isRtl)
Creates a "static" bidi global direction, i.e.
|
static BidiGlobalDir |
forStaticLocale(String localeString)
Creates a "static" bidi global direction, i.e.
|
String |
getCodeSnippet()
A source code snippet that evaluates at template runtime to the bidi global direction, i.e.
|
int |
getStaticValue()
The "static" bidi global direction, as an integer: ltr=1, rtl=-1.
|
boolean |
isStaticValue()
Returns whether the bidi global direction is "static", i.e.
|
public static final BidiGlobalDir LTR
public static final BidiGlobalDir RTL
public static BidiGlobalDir forStaticIsRtl(boolean isRtl)
isRtl - Whether the global direction value is rtl. Otherwise, it is ltr.public static BidiGlobalDir forStaticLocale(@Nullable String localeString)
localeString - A BCP 47 locale string. If null, indicates ltr.public static BidiGlobalDir forIsRtlCodeSnippet(String isRtlCodeSnippet, SoyBackendKind backend)
isRtlCodeSnippet - A code snippet that will evaluate at template runtime to a boolean
value indicating whether the bidi global direction is rtl.backend - The current backend target.public boolean isStaticValue()
public int getStaticValue()
public String getCodeSnippet()