Examples of AuraLocale


Examples of org.auraframework.util.AuraLocale

        return locale.getLanguageLocale().toString();
    }
   
    @AuraEnabled
    public List<LocalizedLabel> getMonthLabels() throws QuickFixException {
        AuraLocale locale = Aura.getLocalizationAdapter().getAuraLocale();
        DateFormatSymbols monthSymbols = DateFormatSymbols.getInstance(locale.getLanguageLocale());
        String[] months = monthSymbols.getMonths();
        String[] shortMonths = monthSymbols.getShortMonths();
        ArrayList<LocalizedLabel> monthList = new ArrayList<LocalizedLabel>(12);
        for (int i = 0; i < months.length - 1; i++) {
            monthList.add(new LocalizedLabel(months[i], shortMonths[i]));
View Full Code Here

Examples of org.auraframework.util.AuraLocale

        return la.getLabel("Related_Lists", "task_mode_today");
    }
   
    @AuraEnabled
    public List<LocalizedLabel> getWeekdayLabels() throws QuickFixException {
        AuraLocale locale = Aura.getLocalizationAdapter().getAuraLocale();
        DateFormatSymbols weekdaySymbols = DateFormatSymbols.getInstance(locale.getLanguageLocale());
        String[] weekdays = weekdaySymbols.getWeekdays();
        String[] shortWeekdays = weekdaySymbols.getShortWeekdays();
        ArrayList<LocalizedLabel> weekdayList = new ArrayList<LocalizedLabel>(7);
        for (int i = 1; i < weekdays.length; i++) {
            weekdayList.add(new LocalizedLabel(weekdays[i], shortWeekdays[i].toUpperCase(locale.getLanguageLocale())));
        }
        return weekdayList;
    }
View Full Code Here

Examples of org.auraframework.util.AuraLocale

@Model
public class DatePickerModel {
   
    @AuraEnabled
    public String getLangLocale() throws QuickFixException {
        AuraLocale locale = Aura.getLocalizationAdapter().getAuraLocale();
        return locale.getLanguageLocale().toString();
    }
View Full Code Here

Examples of org.auraframework.util.AuraLocale

        return String.format("%s/auraFW/resources/%s/fastclick/fastclick.js", contextPath, nonce);
    }

    @Override
    public List<String> getWalltimeJSURLs() {
        AuraLocale al = Aura.getLocalizationAdapter().getAuraLocale();
        String locale = al.getTimeZone().getID().replace("/", "-");
        String contextPath = Aura.getContextService().getCurrentContext().getContextPath();

        List<String> urls = Lists.newLinkedList();
        String nonce = Aura.getContextService().getCurrentContext().getFrameworkUID();
        if (!"GMT".equals(locale)) {
View Full Code Here

Examples of org.auraframework.util.AuraLocale

    @Override
    public String formatDate(Date date, Locale locale, TimeZone timeZone, int dateStyle) {
        if (date == null) {
            return null;
        }
        AuraLocale loc = Aura.getLocalizationAdapter().getAuraLocale();
        if (locale == null) {
            locale = loc.getDateLocale();
        }
        if (timeZone == null) {
            timeZone = loc.getTimeZone();
        }
        return dateService.getDateStyleConverter(locale, dateStyle).format(date, timeZone);
    }
View Full Code Here

Examples of org.auraframework.util.AuraLocale

    @Override
    public String formatTime(Date time, Locale locale, TimeZone timeZone, int timeStyle) {
        if (time == null) {
            return null;
        }
        AuraLocale loc = Aura.getLocalizationAdapter().getAuraLocale();
        if (locale == null) {
            locale = loc.getDateLocale();
        }
        if (timeZone == null) {
            timeZone = loc.getTimeZone();
        }
        return dateService.getTimeStyleConverter(locale, timeStyle).format(time, timeZone);
    }
View Full Code Here

Examples of org.auraframework.util.AuraLocale

    @Override
    public String formatDateTime(Date dateTime, Locale locale, TimeZone timeZone, int dateStyle, int timeStyle) {
        if (dateTime == null) {
            return null;
        }
        AuraLocale loc = Aura.getLocalizationAdapter().getAuraLocale();
        if (locale == null) {
            locale = loc.getDateLocale();
        }
        if (timeZone == null) {
            timeZone = loc.getTimeZone();
        }
        return dateService.getDateTimeStyleConverter(locale, dateStyle, timeStyle).format(dateTime, timeZone);
    }
View Full Code Here

Examples of org.auraframework.util.AuraLocale

    @Override
    public String formatDateTime(Date date, Locale locale, TimeZone timeZone, String format) {
        if (date == null) {
            return null;
        }
        AuraLocale loc = Aura.getLocalizationAdapter().getAuraLocale();
        if (locale == null) {
            locale = loc.getDateLocale();
        }
        if (timeZone == null) {
            timeZone = loc.getTimeZone();
        }
        return dateService.getPatternConverter(locale, format).format(date, timeZone);

    }
View Full Code Here

Examples of org.auraframework.util.AuraLocale

    @Override
    public Date parseDate(String date, Locale locale, TimeZone timeZone, int dateStyle) throws ParseException {
        if (date == null) {
            return null;
        }
        AuraLocale loc = Aura.getLocalizationAdapter().getAuraLocale();
        if (locale == null) {
            locale = loc.getDateLocale();
        }
        if (timeZone == null) {
            timeZone = loc.getTimeZone();
        }
        return dateService.getDateStyleConverter(locale, dateStyle).parse(date, timeZone);
    }
View Full Code Here

Examples of org.auraframework.util.AuraLocale

    public Calendar parseDateToCalendar(String date, Locale locale, TimeZone timeZone, int dateStyle)
            throws ParseException {
        if (date == null) {
            return null;
        }
        AuraLocale loc = Aura.getLocalizationAdapter().getAuraLocale();
        if (locale == null) {
            locale = loc.getDateLocale();
        }
        if (timeZone == null) {
            timeZone = loc.getTimeZone();
        }
        Calendar c = Calendar.getInstance(timeZone, locale);
        c.setTime(parseDate(date, locale, timeZone, dateStyle));
        return c;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.