GithubHelp home page GithubHelp logo

Comments (8)

hendryl avatar hendryl commented on June 19, 2024 3

I'm using swift with this code

self.calendar.appearance.headerDateFormat = NSDateFormatter.dateFormatFromTemplate("MMMM yyyy", options: 0, locale: NSLocale(localeIdentifier: "en-US"))

and the text is still not in English when the phone's language is not set to English. The zh-CN works at any language though..

from fscalendar.

wasimpris avatar wasimpris commented on June 19, 2024 3

TRY THIS THIS WILL WORK
calendar.calendarHeaderView.collectionViewLayout.collectionView?.semanticContentAttribute = .forceLeftToRight

from fscalendar.

WenchaoD avatar WenchaoD commented on June 19, 2024

How did set it and what do you mean by don't want any localization

from fscalendar.

hendryl avatar hendryl commented on June 19, 2024

This is the screenshot when the phone's language is set to English:
screen shot 2015-07-03 at 13 00 54

This is the screenshot when the phone's language is set to French:
screen shot 2015-07-03 at 13 00 07

I want to make it fixed to English, so even when iOS language is set to French, the header text and day name is still English

from fscalendar.

WenchaoD avatar WenchaoD commented on June 19, 2024

This is the way I use it:

    _calendar.appearance.headerDateFormat = [NSDateFormatter dateFormatFromTemplate:@"MMMM yy" options:0 locale:[NSLocale localeWithLocaleIdentifier:@"zh-CN"]];

ios simulator screen shot jul 3 2015 2 15 05 pm

from fscalendar.

WenchaoD avatar WenchaoD commented on June 19, 2024

And you might try:

_calendar.appearance.headerDateFormat = [NSDateFormatter dateFormatFromTemplate:@"MMMM yy" options:0 locale:[NSLocale localeWithLocaleIdentifier:@"en-US"]];

BTW: green colors looks good~

from fscalendar.

WenchaoD avatar WenchaoD commented on June 19, 2024

Yes. Maybe a locale property is better, coz the weekday labels have locale names too.
But I still think that locale follow the iPhone system is a better performance --

from fscalendar.

WenchaoD avatar WenchaoD commented on June 19, 2024

locale property has been added, thanks~

from fscalendar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.