So what I did is build something called the in-app language switcher. And so basically for a debug builder or app there's a preferences pane you can tap on it and then it gives you a list of all the languages that we have and allows you to just tap on one https://casinoslots-ie.com/entropay. And it essentially restarts the app or restarts.
It doesn't restart execution of the app, it kind of restarts the user session. And I think it will make sense when you look at a screen movie that we are going to do here. I prepared this movie. I'm gonna be like Tim Cook at Apple or Steve Jobs, like: "I prepared this movie for you. I'd love to show it to you if you'd like. Would you like to see it?". Yes, okay very good. This is going to get an Emmy award I think at some point. So here you are running around in the application and it's in English and everything is delightful. The world is wonderful. Now we go to the more menu and that's where you put all these extra things and then we go to the localization debug. And we can then say: choose English from your start with Arabic. So pay attention to you notice that now everything is laid out right to left. And we've gone and refetched the entire home screen that's called "the lolomo for lists of movies". And you can see the display page for the same title all laid out crisply in Arabic. And the order of buttons goes in the different direction. And everything is good. When you're using this you have to remember the position of the debug menu. Otherwise you get completely lost. So I've kind of muscle memory to be able to "Help! Get me out of here!". And so we can switch to another language like Japanese. And you switch that. And that is JA like Japanese, not "ya" for German. And you see now everything's bringing you back. And again the metadata so the row titles, the artwork everything now in Japanese and you can exactly see how things are working. And let's see where should we go next. Let's travel along and go to... oh I don't know. I'm gonna pretend I'm doing this live. Let's go to Thailand. So switch to Thai or TH. And again now here you can see especially if you look in the bottom on the tab bar how wide that is and how tall it is. That took a lot of effort to be able to make these tab bar items fit properly. The Thai really was a... it was a bit of a challenge. But everything seemed to have worked out in the end. Our heroes made it work. And they were richly rewarded by... Oh wait, no we weren't taken to Thailand. All we did is get to keep our jobs. Alright so now we're going to switch back to English. And again one thing also you might notice as we scroll that want you to pay attention to something that we'll be talking about a little bit later. Alright so in the back of your mind you're thinking: "Well that's kind of cool. I'm wondering can I do this too?". And the answer is "da" or yes, you can. Sounding like Obama now: "Yes, you can". So it actually... I have to talk a little bit about some of the differences between how localization works on iOS versus Android. So does anybody develop on Android as well? Yeah, okay. So you know normally I would say that I'm not terribly jealous of my colleagues who work on Android.
0 Comments
But in fact to really make it work properly you also have to have it work with the metadata, the descriptive information about the movies: the titles, the synopsis that come back to the server. So what we end up actually doing is that we send a fake language code of EN-XA to our server and then that basically means that all responses are also pseudo-localized. And you can really see that it keeps you from drinking too much because if you come into the office in the morning and it looks like that just like: "Oh, f***. What did I do last night?" "No-no, it's ok.
It's pseudo-localization!". But it is important and this is kind of the difference between you know what we're able to do with taking it as a kind of a company-wide initiative. Otherwise you know if you don't happen to have... if you're not as big as an organization what I can tell you is that Xcode does allow you to pseudo-localize as well. And I highly recommend it for doing it. It's one of the best ways to be able to test how your app is going to behave in other languages. And there we go. All right okay now we understand what some of the problems are and I think that the first thing you have to do is use Auto layout. And I was kind of surprised because I've been developing with Apple technologies since it was next step. And so when Auto layout came out it made lots of sense to me and I know that there were a lot of developers a lot of people from other programming languages or environments on the team. And there was like: "Ah, Auto layout is a pain!". Yes, it is. Auto layout absolutely has been a pain in the ass. It's gotten better. But it's still a pain in... How do you say "ass" in Russian? There we go, what he said. Thank you. But the important thing is that whatever issues you may have for it, speed or whatever in some cases you're just kill yourself trying to do it especially when it has to do things with reversing the order of it. So it allows you to basically describe the behavior that you want. Where a lot of times for a button is I want the text label to go in the center and then I want there to be a border on the edges so no matter how much you have to expand make sure you have that. Even then though if you think back to the French example you're always going to have to make some compromises because you're trying to get a range. And so what ends up happening is that you have to have a relationship with the designers and start asking these questions from an early moment in the design saying: "Thank you. It looks great in English. What happens when the French get a hold of it?". So we've kind of trained ourselves as a practice to really think about that a lot. So I'm not going to go into how Auto layout works. That's for you to find out with... there's a million talks on WWDC about that but it's mostly a friendly reminder that you need to use it. Alright so pseudo-localization is one technique that we have. The other thing is dealing with human languages because as good as pseudo-localization is for as a technique sometimes you have to be able to deal with other languages and that's particularly because we do so many A/B tests right. And so in order to make it work what I ended up having to do as a developer I would maintain multiple user accounts in different languages. And you would have to log in and out of those. And it became incredibly tedious and as an engineer when something is tedious you try and figure out how to engineer a solution to it. And so English is the baseline for line width. All right so then if you look at in other languages like Japanese and Korean they're much more compact in terms of line length but they also have some very very specific challenges especially those that have phonetic components to their language as well. And so but you know that's what it will look like there. Then some languages compared to English like German, Polish and French... Are there any French people out here? Oh, we can make fun of them, good. Okay so because French is very very expensive and so you know what ends up is like you imagine that as they're translating the phrase they're like you know philosophizing at the same time.
It's like instead of just saying "find something to download" it's like "find something to download and waste your life you fool". Seriously it does expand so you can see in this example that you have to have two lines of text to be able to make it work. So yes the French can be and in fact often is difficult. Alright and so other languages as you may know like Arabic and Hebrew, they layout right-to-left and so that's its own kind of difficulty. One thing I did I want to point out in terms of details if you look at the typeface... we actually use a custom Arabic typeface because we want people to kind of when they look at the user experience it should feel like you know a luxury hotel in Dubai. And not you know a text of something else that may cause concern. And then there's Thai. The Thai is another interesting case because Thai has all these characters if you look up, they kind of these accent marks which make for insanely tall line links and that can cause you some heartache. And so knowing that these are the types of challenges that you come through regularly for the language we work on what I suggested when I got there and I said that the only way to have success with this stuff is to take all the engineering team and send them to 4 star luxury hotels around the world so we could have training in a country and to see that it works. It's like if you want us to make something good in French there's no nothing less than the hotel Crillon in Paris will do and tie with all the kind of long... the line links we need to be like have massages all the day so we can make our body long and lean to resemble the characters. And then you know for compactness and efficiency there's no substitute to going to the finest sushi restaurants. So that's what I asked for and I called our CEO and I said: "Reed, dude let me borrow the corporate jet for a couple of weeks" and he said "nyet". In fact I think he said "hell nyet!". So we had to go back to the drawing board and try find it a different technique. And so there is something called pseudo-localization. And so we have actually gone in all for pseudo-localization so what it is essentially it's a technique for taking a base language like English and making it behave as if it was other languages so you add additional characters so it goes about 30% wider and you add you know accent marks and other kind of things that extend the top line and the bottom line. And so the point of it is that we actually do it so that by default. When you run the app under debug you are always seeing a pseudo-localized English text and that's actually on all platforms. It was kind of a decision that we made as a group engineering organization across all platforms. And so what what's nice about it is that you can see kind of right away if there's a problem and so it's been really really helpful for it but because you know problems are caught early and in our first instance of it we did it just for the user interface on the app. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
August 2019
Categories |