Search in sources :

Example 1 with LocaleString

use of com.google.template.soy.shared.restricted.ApiCallScopeBindingAnnotations.LocaleString in project closure-templates by google.

the class ApiCallScopeUtils method seedSharedParams.

/**
 * Helper utility to seed params shared by multiple backends.
 *
 * @param inScope The scope object that manages the API call scope.
 * @param msgBundle The bundle of translated messages, or null to use the messages from the Soy
 * @param bidiGlobalDir The bidi global directionality. If null, it is derived from the msgBundle
 *     locale, if any, otherwise ltr.
 */
public static void seedSharedParams(GuiceSimpleScope.InScope inScope, @Nullable SoyMsgBundle msgBundle, @Nullable BidiGlobalDir bidiGlobalDir) {
    String localeString = (msgBundle != null) ? msgBundle.getLocaleString() : null;
    if (bidiGlobalDir == null) {
        bidiGlobalDir = BidiGlobalDir.forStaticIsRtl(msgBundle == null ? false : msgBundle.isRtl());
    }
    seedSharedParams(inScope, bidiGlobalDir, localeString);
}
Also used : LocaleString(com.google.template.soy.shared.restricted.ApiCallScopeBindingAnnotations.LocaleString)

Aggregations

LocaleString (com.google.template.soy.shared.restricted.ApiCallScopeBindingAnnotations.LocaleString)1