Affiliate Disclosure
If you buy through our links, we may get a commission. Read our ethics policy.

Apple's Swift programming language translated to Mandarin Chinese thanks to open source project

Last updated

Coding for Apple devices just got a little easier for thousands of developers in China, as a group of more than 100 programmers recently wrapped up an open source Mandarin Chinese translation of Apple's Swift programming language.

Project creator Jie Liang, currently a student at BeiHang University in Beijing, said in a blog post that the Swift translation was finished last month after a year's worth of open source development, Bloomberg reported on Thursday. Over its lifespan, the translated version has been accessed more than two million times on GitHub, the publication said.

Liang started the enterprise to "synchronize China and the world," alluding to both the current state of modern coding, which is dominated by English-based natural language programming protocols, and the proliferation of Apple's iOS operating system. Code suites based on languages other than English exist, including the Mandarin-friendly Easy Programming Language, but their utility is questionable.

Developers who can't speak English are at somewhat of a disadvantage, as code written in other languages are more difficult to market. English has therefore become the de facto standard of the global coding community. Given Apple's commanding presence in the mobile app marketplace, and its popularity with Chinese users, Liang's Swift translation could open the door to a huge number of iOS and OS X programmers.

Apple's unveiling of Swift in June 2014 came as a surprise to many. The coding language was designed with Cocoa and Cocoa Touch in mind, but also works well with Objective-C, allowing developers to interchange languages.

At its Worldwide Developers Conference in June, Apple surprised developers once again by announcing plans to open source Swift for iOS, OS X and Linux. The company also announced Swift 2, which comes with a number of efficiency tweaks and new features.



9 Comments

brakken 11 Years · 687 comments

So if this means Linux has potential software and games that function across distros, who needs Chrome or Windows?

phone-ui-guy 18 Years · 1018 comments

[quote name="Brakken" url="/t/187527/apples-swift-programming-language-translated-to-mandarin-chinese-thanks-to-open-source-project#post_2757757"]So if this means Linux has potential software and games that function across distros, who needs Chrome or Windows?[/quote] This isn't all the APIs and Frameworks that make iOS and Mac OSX great. This is just the language. So you cannot just run an iOS game on Linux. You could program a game for Linux in Swift.

brakken 11 Years · 687 comments

[quote name="Phone-UI-Guy" url="/t/187527/apples-swift-programming-language-translated-to-mandarin-chinese-thanks-to-open-source-project#post_2757763"] This isn't all the APIs and Frameworks that make iOS and Mac OSX great. This is just the language. So you cannot just run an iOS game on Linux. You could program a game for Linux in Swift.[/quote] So even if software is written for iOS, it would still need to be changed significantly to work on Linux hardware systems? Thanks for helping me understand.

konqerror 12 Years · 685 comments

Quote:
Originally Posted by Brakken So even if software is written for iOS, it would still need to be changed significantly to work on Linux hardware systems?

Thanks for helping me understand.


Yes, unless somebody reimplemented Apple's libraries/frameworks for Linux. It actually has been done (partially) under the GNUStep project.

 

This is also what Microsoft is doing with iOS on Windows 10. The Oracle v Google Java lawsuit was whether somebody can legally do that under copyright law, and the answer is yes.

durandal_1707 12 Years · 359 comments

Here's the github page that this was talking about: https://github.com/numbbbbb/the-swift-programming-language-in-chinese It looks like this is a translation of the [i]book[/i] describing the Swift language, not a translation of the language itself, which is what the article seemed to be implying (and which was surprising me, since AFAIK the source code to Swift hasn't been released yet). Also, it took a while to find the github page in question, since the article didn't seem to link to it anywhere. What a great article! [quote name="Brakken" url="/t/187527/apples-swift-programming-language-translated-to-mandarin-chinese-thanks-to-open-source-project#post_2757769"] So even if software is written for iOS, it would still need to be changed significantly to work on Linux hardware systems? Thanks for helping me understand.[/quote] Lots of languages are available cross-platform. C, C++, Objective-C, C#, Java, Python, Ruby, Perl, Haskell, Scala, BASIC, Pascal, x86 assembler, and plenty of other languages can all be used on Mac, Windows, and other platforms. The language doesn't really matter as much here, though; what matters for cross-compatibility is the APIs you use. An API set is like a series of commands that a program can send to the OS to tell it to do things like create a file, open a window, or what have you. Each OS tends to have its own API set, and that means that you can't typically just write native code for one OS and have it magically work on the other. What we call a computer "language" is really more analogous to the [i]grammar[/i] of a natural spoken language, whereas the API is more analogous to the [i]vocabulary.[/i] Say you invented a language whose grammar was identical to that of French, with the same rules for pronunciation, conjugation, etc. as French, but in which the words themselves were all different. You could try speaking to a French speaker in this new language, but the two of you wouldn't understand each other. What you [i]can[/i] do in C, C++, Objective-C, and Swift (once the open-source code for it is released) is to write all your back-end code that's not dependent on any operating system in that language, and then just write separate versions of the front-end code for each operating system. Another thing that you can do is to use a cross-platform library that basically does this for you, providing a platform-neutral API, that translates to the proper API calls for each operating system. Plenty of these exist; popular ones include wxWindows, Qt, Tk, and the Java JRE. There have also been open-source projects to reimplement the APIs from one operating system on another such as .NET (Mono), Win32 (WINE), and Apple's Cocoa (GNUStep, Cocotron). Many users complain that apps written for cross-platform frameworks tend to have a "non-native" feel to them, however, compared to software written directly for the OS's native API set. Fun fact: The predecessor of Cocoa, OpenStep, was actually a cross-platform API toolkit, as it was ported to Windows NT, allowing apps written for NeXT to be effortlessly ported to that platform. Apple at one point was planning to extend this ability to Cocoa under the name "Yellow Box", but this was dropped by the time OS X 10.0 was released.