>> Jan Nelson: Okay, good evening. I'm Jan Nelson,... Windows International group in Windows division.

advertisement
>> Jan Nelson: Okay, good evening. I'm Jan Nelson, Senior Program Manager Lead in
Windows International group in Windows division.
>> Cameron Lerum: I'm Cameron Lerum, Senior Program Manager in the Windows
International division.
>> Jan Nelson: And our talk tonight is about the Multilingual App Toolkit, an extension
into Visual Studio. So let's go ahead and get started. Your clicker is...
>> Cameron Lerum: Okay. That was quick [inaudible].
>> Jan Nelson: There we go. So we're a go there. All right, so let's talk about creating a
Multilingual App Toolkit with the Windows Phone today. So you build your rockin' cool
app; it's got great features. You're pretty excited. Test it and upload it to the store. Life is
good. And then, you start to notice that all the downloads are in English. Okay? Now
that's great. United States. But you really would like to extend it out, so you add some
resource files; you're going to go do some other languages including the language that
you speak.
You've got to add the bindings to the resources; that's after you thought you were done
with the codes. There's a little bit of rework there. You get the resource files localized,
which again is something, an additional job you've got to get done. You've got to figure
out how to do that. Once they come back you've got to be able to test the app in all of
those languages as well and then discover the bugs that require code fixes and then
manage all those different language files separately again. Apply the fixes, rinse, repeat.
And so, it can become kind of a job to ship in more than one language today.
So I think that's the point of cuing up Cameron. So why would I do that? So here's your
slide.
>> Cameron Lerum: All right. Thanks, Jan. So one of the main reasons you do that is,
look at some of the research that Adduplex has done. And they're stating that just for the
Windows Phone, only 33 percent of Windows Phones actually are activated in English
which means that you're missing out on potentially 67 percent of your market for your
app. You want to make it so it works in different markets, right, very particular the
[inaudible] country. But most of the apps out there are not country specific; they're just
language specific. So it's a relatively easily solved.
Again, the tax of having to modify your resource files manually and going back through
can be pretty extensive, so a lot of people that I've talked to who are actually multilingual
don't even do it. So we're trying to solve some of that problem.
I have an app that I wrote a while back, and I don't really do much with it but I kind of just
keep an eye on it. So I thought, well, those Adduplex numbers are interesting but how do
they really apply to me?
So what I did was I took my app and I said, okay, I shipped it with Russian and English
because I have a Russian-speaking friend and she said, "Yeah, I'll translate that for
you." But I didn't do any other languages. And it's been out there a year or two, a year
and a half or so. So I said, what would happen if I put the ratios of Adduplex against my
actual downloads? And I'm just doing bars, not actual numbers. But what I did was I
ratioed up the number of downloads I would have to have so that my English downloads
would be the 33 percent that the Adduplex says. And then, the yellow bar -- or the
orange -- Sorry. That's blue today, isn't it? The blue bars are the bars that are my actual
downloads ratioed to each other. So you can see I'm very strong in English and that
covers Great Britain, that covers the United States, you know, South Africa, and some
other countries that are very dominant in English speaking.
Across the other languages I get very few hits. Russian is obviously my second largest
language other than English. The Adduplex is almost exactly the same when I ratioed it
out. So for my one app that I'm testing it against, their percentages are working out for
Russian. I've just uploaded my app with Spanish, Italian, French and there's another
one, I forget. It was so easy, I forgot. I mean, I did four more languages. So it'll be
interesting over the next couple of months to see if those numbers start to ratio up with
the rest of it. Now I'll go ahead and turn it back over to you.
>> Jan Nelson: Okay. So with Multilingual App Toolkit things are a little different. We
have a common workflow between the Windows Store and the Windows Phone. We
integrate directly with a Visual Studio ID that includes the express additions so that the
price of entry to use the toolkit is as easy as it gets. We provide a pseudo-language so
that you can go ahead and do sort of the localization-internationalization testing without
having to know a second language. Translation file export and import is very interesting
in that we allow you to take those files and then hand them off either through an e-mail
or to some network share location that you want so that if you're a small app developer
and you've got somebody else that you know casually who speaks another language
who can support, it's a very easy way to hand them those resources and bring them
back in.
You'll note that in the bullet after that we talk about an editor that goes along with that if
they don't have a way to easily see those resources; we provide that for them. And you
can see that we also use XLIFF which is an industry-standard localization format, an
XML format, for containing those resources. So if you were to hand those resources off
to a translation vendor who's in the business commercially, they'll understand what to do
with that file.
And then to get suggestions, really quickly, we have full integration with Microsoft
Translator Service built into the toolkit. So let's talk a little bit about the workflow.
>> Cameron Lerum: Yeah, okay. So on the workflow, again talking to developers, one
of the things that they've said is, "It's just a tax. I don't see the value; it's a tax." So we
said, "Okay, how can we make it less taxing or a tax-free environment?" So we don't
solve the problem of you needing to actually put the bindings into your code. So, you
know, you have to bind to the resource and that line? We figures that is something that
would be nice for us to do but it's outside the scope of what we're trying to do right now.
Maybe sometime in the future, but we decided not to take that on.
Although, with Windows SDK 8 it puts in the comments header block for you so you just
copy and paste. So you don't even have to know what the code says. You can just copy
and paste and put your resource ID in. So it's really easy to do. So you want to do that
while you build your application. After that we don't want to force MAT on anybody with
the Multilingual App Toolkit and so what we have is an enablement project. I want to
have multiple languages.
So you select that manually from the tools menu. Once you've done that, we actually
then add the pseudo-language to your project automatically because pseudo is a great
testing language. And we do it here at Microsoft and now we've made it available for
third-party developers as well.
And then you can so, "Okay, now let me select my production languages that I want."
And for this example, in the highlight I've got French. So I'll just right-click on the project,
go down and say add translation languages, select the language I want, out of all of
them that are available I'll pick French, and build. Now I'll have an XLIFF file with my
translations from English in the file; now all we have to do is translate them and that's
what we do on the next one.
So I've built -- Because building is how we take the resources, gather them together and
put them into the process. So with Phone you can get away with not building the first
time but if you add resources, you need to build before they show up. With the Store you
have build before they show up at all. It's just a design of how it integrates in so we don't
interfere but at the same time give you the flexibility. So you just machine generate and
run your program.
It really is that simple. And so enable, add, build, generate, run. And you have up to
however many languages. I think that Microsoft Translator Service for machine
translations supports 39 languages right now. So you can get 39 languages in less than
5 minutes. Now they're machine quality translation. And I would put a note in my app if I
shipped that. I actually did. I said, "These are machine translated. Click here if you want
to make them better," that way they can provide feedback and I'll show you in a little bit
how I can give them the tool that they can actually do community translation for me.
So we have a whole roundtrip available here. And enough slides; let's actually get into a
demo. So I'm going to go ahead and go into -- Let me minimize this. I'm going to go
ahead and go into Visual Studio and what I have here is have just a sample little phone
app that grabs weather. And the reason I've picked that one as my app -- Let me stop it
here real quick -- is because a weather app requires content from the Internet. And
content from the Internet -- We were actually having a conversation earlier: what
language do I want the content in? Right? It also has local resources. And you'll see in a
moment that it also has resources that come from the operating system such as
calendar controls. So a weather app is a simple app but it's a pretty good demonstration
of what you need to think about as you go into multiple markets. So I'm going to go
ahead and just run this. This is just straight app. It doesn't have Multilingual App Toolkit
enabled. It's just localization ready with an English resX file.
So I'm going to go ahead and run this just to show you what it looks like, kind of get a
feel for it. And you saw the little delay, went off to the Internet and got current weather.
You can see that, you know, today's the current day. It's from Redmond. I'm getting it
from the Renton Municipal Airport and we have some basic data and the copyright of the
information and who the service provider is. Right? Standard scrolling around. I've
thrown some big text up because I really want to know what it's going to be like in the
next couple of hours.
>> Jan Nelson: Showers, showers...
>> Cameron Lerum: Showers.
>> Jan Nelson: ...showers.
>> Cameron Lerum: Showers, showers.
>> Jan Nelson: Showers.
>> Cameron Lerum: Oop. I don't understand the demo thing. It always says showers
here. We need to talk about that.
[laughing]
>> Jan Nelson: Yeah, okay. Let's go some place like California.
>> Cameron Lerum: So we have mostly cloudy, mostly cloudy, mostly still cloudy -Ooh, there we go. That's an improvement. We have rain now. Okay? But you can see
I'm getting weather back. I'm getting a "feels like." I'm getting time. I'm getting other
information. And then I've got my week in the view; I've got my days of the week. And
it's...
>> Jan Nelson: Showers and showers...
>> Cameron Lerum: ...supposed to be sunny, you told me.
>> Jan Nelson: ...and showers and showers.
>> Cameron Lerum: So a pretty straight forward app. I have the ability to change my
location. You know, no big deal. I'm not going to demonstrate that because, you know,
don’t want to see San Diego with the sun. And I have the ability to change some
configurations. Now one thing I've done here is I want to give my user the ability to see
multiple languages. Especially with machine translation, I might want to ship Italian in
machine translation because I don't have any resources or money, because I gave this
thing away for free, to have it translated. But maybe they want high-quality English rather
than suggestion quality machine translation. So as I'm thinking about it, do I want to give
them that option. And in this case, I do.
So I have the ability to change my phone language. Now as I said early, this app is only
supported in English and English resX file at the moment. We're going to fix that in just a
minute. So let me go ahead and cancel out and stop the program.
So do you remember the work flow earlier? I said first you write it so it's localizable by
doing your bindings. You obviously install MAT which I have done. It's a 2 MB download,
doesn't take a lot of disk space. Then, you enable it.
So I'm just going to go to my project, climate observer. And I'm going to say under tools,
enable to Multilingual App Toolkit. It modifies the project. There's some hookins for build
environments. There's a build task and some other things that hook into it. And then it
creates that pseudo-language file I was talking about earlier. You'll see that I have it
highlighted. It's a new extension that you're not familiar with and that's that XLIFF 1.2
Industry File. And what I can do with this file here is I can right-click it and generate
pseudo-translations.
Now pseudo-language just English with different markups on it so you can see where
your program is showing the different languages and maybe how the hard code is
trained. So I'm going to go ahead and just do a pseudo generate on this. And I've got 27
resources I got generated. I'm going to press the FI key and we're going to start up
again. Now the phone can't switch to pseudo as a phone language, so my little ability to
switch it over is a nice feature so that I don't have to worry about how I display pseudo.
So I can come in here and just say show me pseudo-language.
Now what I've done is there are some really fancy gymnastic trips you can do to make
this switch automatically. I decided just to go straight with the toolkit, and all I do is store
the language that I want in isolated storage. And then, when I load the app next time I
load up that language instead of the default one. So I exit the app and come back in for
this demo. Now this is interesting: I can't get weather. It was just working. So something
changed when I applied localization that I want to debug because it was working in
English but now maybe in Italian it's not going to work. So we'll dig into that in a little bit.
But right now you'll see that I have pseudo. One of the things you'll notice on the pseudo
is that we've expanded it quite a bit. Now in the phone environment, truncation is actually
part of the design. So it's not necessarily a bad thing, but you'll want to know how much
of it you're going to have. Excessive amounts is probably a bad thing. You also have
unique ID's, so you can actually have a tester log this bug and even if you keep
generating, this will be the same ID as long as the resource string doesn't change. So
you can go find it quickly in your system.
Oh, this is obviously not a localizable string so I've got a localization bug there. Right?
Pretty straight forward. My location -- Actually, let me pull that back up. Sorry. My
location buttons, down here, these are pseudo. So now I know that I'm actually pseudo
locally to my up bar which requires code behind because it doesn't work when you put it
directly in the XML. Another thing to consider that you would notice right off the bat.
I got location. That's looking like I’m pseudo-localizing everything. And we've also got
our controls here, and it looks like I'm doing a good job on that. So I'm going to figure out
what's going on here. Now the one thing I do know about my application is that I ask it to
return the weather data in a particular language. And I told it to pseudo-localize the
entire file. So what's happened, since I'm wasting time debugging, is the language code
that I told it, it put those hash codes in front. So now I'm telling it basically junk, "Give me
back junk language," and it's going, "I don't know how to talk that language.
So let's go into our pseudo file. We'll pop up our editor. This is a stand-alone editor that
allows you to work with people who aren't in Visual Studio. So if you have a friend who
speaks pseudo -- Well, in this case it'd be Italian -- you could send them your XLIFF file,
which I'll demonstrate in a minute. They can use this free editor which is the same install
point, but it won't install in the Visual Studio components if they don't have it installed or
if they choose not to through a custom install. They can edit this file and send it back to
you. Now I know that my pseudo problem is right here because it's my demo and I've
worked at it before. So I'm just going to reset this string, and I'm going to tell the weather
service -- What do we want for a language back from our weather service? Italian? We
seem to be stuck on Italian tonight. So I'm just going to give it the language code for
Italian. Save this and then, run again.
And now our language services return in Italian as the language. If it doesn't understand
the language, I would actually change my code to produce a better error result rather
than couldn't get weather because you want to tell them to have a different preference.
But now you can see I can actually have my app in pseudo and have my consumer data
in Italian. So that gives me all kinds of flexibility for my target audience. Maybe I want my
language in Spanish because I'm learning it even though I'm a native English speaker.
That would be an interesting scenario to add in: how do you want your weather today?
Maybe it gives me the opportunity to look at my Celsius degrees rather than Fahrenheit
all the time. There's all kinds of fun stuff you can do with it; again, configurable for your
customer but also required because you're talking a global market and to global
services.
The other thing we'll look at down here is my sunrise and sunset. Those are expanding
quite a bit so it's probably going to be problematic in my design. I've got an interesting
area here where I seem to have some type of wrapping in my "feels like." But notice on
the time, the P and the bracket afterwards. Right here. This is not something we're
pseudo-localizing because we don't have the codes on the top. So that's actually coming
from the operating system. So the Windows Phone, a very limited amount, but it does
have pseudo-language in the operating system. So now what you're seeing: I have
content from the Internet. I have content from my pseudo-version of my resource file,
and I also have pseudo content coming from the OS controls themselves which is
interesting when you want to start working with calendar, time and dates, those type of
controls.
It's a good way to test to see you're actually using the calendar controls instead of
formatting your own strings which would be very difficult to do and go into multiple
markets properly. So again I've still got my date problem there. I'm getting Celsius.
That's from the service. I'm telling the service to give me default so that makes sense.
Again, I have a few more controls with time on it and they're still doing the pseudo. And
then, I scroll over to my week and my Thursday is also pseudo-localized. But again, I
don't have my identifier in front so that means these days are coming from the operating
system which is very useful when I do switch to Italian finally because now it will actually
say it in Italian rather than English. So my app will automatically adjust as we move
forward.
So let's go ahead and -- I got all my things here. Let's switch it to -- Let's force the thing
to Fahrenheit. So now we're getting our degrees in Fahrenheit. Again, I'm able to give
customer preference. I'm able to tell the weather service. While it's not necessarily the
localizable data, it's customizable that's on the same scale as what language and what
degree system do I want.
Okay? So that's pretty straight forward but no one really wants to ship pseudo, right?
The other thing I'll say is I did test my app recently. I put pseudo in it and shipped it
through the Store; it passes certification. You may not want to add the resources just
because, you know, they're useless but it won't block you from being certified if you do
forget to uncheck pseudo. So let's go ahead and add in some more interesting
languages. So I'm going to right-click this; at least I think I am. There we go.
>> Jan Nelson: There you are.
>> Cameron Lerum: And I'm going to select "Add translation languages." Now we opted
not to put it under the standard add menu, and we've gotten some feedback that we
might want to reconsider that. But this is not something you're going to use all the time,
so we didn't think it made sense to go in there. We thought we wanted it easy access,
add once and then, not worry about it.
So let's go ahead and add in Italian. And we can do the different flavors, but I'll do
Italian, Italy, just for the sake of argument. How about Japanese? Japanese is always
interesting.
>> Jan Nelson: You'll note that there's some little icons to the right of some of these and
says, "Microsoft Translator," if you can read that. And so what we're doing is we're
grabbing the available translation languages and then populating this. So as the
translator team add them, your list will continue to change and grow. And just know what
you can machine translations for when you select those. So you can get those
translation suggestions pretty easily that way.
>> Cameron Lerum: Thank you. Another good point on that is since it is machine
translation, it's language agnostic which means it's just going to be, in this case, Arabic
not targeted at Saudi Arabia. Right? So it'll be just German, just generic German, not
German, you know, Germany or German, Austria. So when you're thinking about the
language aspect of that, that's interesting.
A caveat on that is that also means I can support a limited set of language fallback. So I
can select German and then, I can tailor for German, Germany maybe five strings that
are particular for that country's version of the language. And if those five strings aren't
the ones I'm using, just go to the generic German that works for everybody. So you don't
have to translate all of your different flavors or German to get a good German
experience, just a few that you wanted. And there's way to control that and say, "I don't
want to localize these ever," and it will just go into the system.
This is a pretty good hit list. Let's go ahead and take this. So, again, you'll see that it's
adding the XLIFF files to the system. Now there's one thing that I want to show you that
might mess people up. If you're familiar with how to do localization, you know you make
a resX file that has the language code in front of it. Well, if I open this, I’m going to go,
"But where's my string?" because the only thing there is the two strings that the
Windows 8 SDK puts in and that's your language code to help you load the right fonts
automatically as well as your flow direction.
We take care of that for you. The resources are store in your XLIFF. We populate the
resX file for compilation, so you don't want to go modify your resX file for your strings
because we're going to override them. So if you see that this is empty, there're only two
reasons why: one, you haven't built or two, you said, "I actually don't want that string
translated," so we leave it out of the file to enable fallback. Okay? That's a key point to
remember as we move forward.
So I'm going to go ahead and actually I'm going to open these in the editor because I
know I've got my language issue or I'll do the wrong language. So let me go ahead and
load this up. Pretty sure I double-clicked that. It did. Okay. Now I have the ability to say
translate all. The other thing that I can do is since I know I have this language thing, I'm
going to change this one to be AR dos SA right off the bat because that's the language I
want and then, I'll just say translate all. When you say translate all it knows the
translation state and it won't mess with anything that is anything other than new. So even
if it needs review, it will assume that you're just in a workflow state and it won't override
it.
>> Jan Nelson: So the fact that you changed that changed the state so it didn't override
it when you said translate all.
>> Cameron Lerum: Yeah because my little icon here, which you can sort on, says that
it's translated. And so since it was translated as a process, it said, "Oh, that's already
been handled. I'm not going to machine translate that for me." Which is interesting
because it gives you the ability to do some translation and then some machine
translation and know whether they're going to collide. Okay?
>> Jan Nelson: So there's a pretty sophisticated workflow embedded in this little toolset
that actually can scale beyond that informal user along with the pseudo hastag and the
ability for tests to hook up automation. You can start building some very interesting
scenarios if you want to scale this up a little bit.
>> Cameron Lerum: Yes. All right, we'll make Italian here. And [inaudible] Japanese. I
forgot to localize that one. Oh, that's an interesting part for my demo then. Apparently
I've already done the Japanese one. It must've been on disk and it just pulled it up, so
we'll just stay with that. Now one thing I forgot to do is actually do translate all when I
was in Italian. So now that I know that I've marked my strings so they're already marked
as translated for the ones I need to be a particular way, I just go ahead and generate
from inside Visual Studio because it will, again, ignore the one that's been translated.
Again, just run. Who here has actually done multiple languages in the resX model of dot
net? Okay.
>>: Very little.
>> Cameron Lerum: Does this look a little easier?
>>: Yes.
[laughing]
>> Cameron Lerum: Good.
>> Jan Nelson: Good answer.
>> Cameron Lerum: That's the right answer. Check's in the mail. So we'll go ahead and
do our languages. Any language preference?
>>: Arabic.
>> Cameron Lerum: Arabic. I knew it.
>>: [inaudible]
>> Cameron Lerum: Yep, Arabic is always a fun one, isn't it? Again, I need to exit and
restart because the way I haven't overridden the language manager. But you could. And
there's Arabic. And notice when I scroll, actually I'm scrolling the wrong way because I
should've gone the other way to get to my week first. Again, I still haven't fixed the day
one. That's a pretty easy one to fix.
Now here's something that is a bug: my buttons aren't mirrored. And the reason my
buttons aren't mirrored is because they're code behind. And so, I just said -- If you're
familiar with how to add buttons in code behind you basically say, you know, application,
button control, add, add, add. Well, it's going to list them in the order you added. And I
don't want to say it's a bug in the phone SDK but it doesn't change the order based upon
the locale. So you would, in code, just basically say, "What is my code direction?" And if
it says, "Right to left," or, "Left to right," you would then just add the buttons in a different
order. It's pretty easy to work around but it's something you'd have to consider. Again,
who here can read Arabic? Okay.
But here's an important part: it doesn't matter if you can read it or not because you know
approximately what it's going to look like if you ship it with machine translation or even if
you're having it professionally translated. You can look at this and go, "You know what?
Things look like they fit." or, "They look like they don't fit. I should make some design
adjustments."
So not only does machine translation give you the ability to get into a market that maybe
you wouldn't have gotten into before because you had no languages services there, it
also gives you the ability to make that language your target market languages, your test
languages easily. So now I can fully test Arabic. I can test my functionality just like I did
with pseudo and I can make sure we don't have any issues.
>> Jan Nelson: And you can do some design work off of it since you can see what it's
going to look like in the final result. And the translations are probably close enough in
length that you can look at your layout and decide what you're going to do about that.
And if you are going to talk to a translator, you can give them specifics and say, "Hey,
you know what, for this string I really need it to be a little bit shorter."
>> Cameron Lerum: Yeah.
>> Jan Nelson: What can we do? Is there another term that we can use and have
specific conversations that'll help fine tune something if that's indicated.
>> Cameron Lerum: So Cairo, C-H-I-R-O?
>> Jan Nelson: C-A-I-R-O?
>> Cameron Lerum: Yeah, that's right. C-A...
>> Jan Nelson: No H.
>>: There's no H.
>> Cameron Lerum: Yeah.
>>: C-A-I-R-O....
>> Jan Nelson: A-I-R-O.
>> Cameron Lerum: Let's see if that pops up.
>> Jan Nelson: Yeah.
>> Cameron Lerum: Ah. So...
>> Jan Nelson: Nebraska.
>> Cameron Lerum: [laughing] Nebraska. Let's pick this one that looks like it's not in the
U.S. So here's our weather service for Cairo. And you'll notice that most of it's coming
back in Arabic, but we still have some data that's coming back from the service in
English. Not much I can do about that except maybe pick a different provider. This is the
MSDN provider -- MSN provider. But all in all that's works pretty straight forward, pretty
easy.
I think that's about it for how the toolkit works. The thing that I really want to emphasize
is the amount of time we spent dealing with language issues is in how the program
responds to it, not how do I get translations or how do I manage translations. I know in
my app I have English and Russian, and this is before we had the toolkit for the phone. I
made the mistake of adding my resources in to the Russian language and not adding
them in the English language. And I was testing the Russian and everything was fine.
And I went and switched over to English and I was like, "There's something missing."
And my English resources had no fallback because English is my default language. And
I literally had gaps in my UI where I should've had English because you need to
manually modify the files. You need to manually move the resources between all your
resX's. We take care of all that for you. Stay in your native language. Let us manage the
rest, and it'll just work.
If you already have an application -- And I don't have it set up to demo that -- but if you
already have an application that has multiple resX files, we actually provide the ability to
right-click. And it won't show up here because it knows the scoping of it, but if a resX file
was here, I could right-click and there would be a menu right up here that would say,
"Convert to XLIFF." So then, you could roll your existing language files into your
management system, preserve the languages because it will do a string and a source
and target compare against your language neutral to this language file. If the strings are
not identical, it will say, "Oh you've translated this." And it will mark it as translated and it
will be preserved.
So now you can use MAT, convert your existing ones to the language system and then,
add new languages on top of it. So we've tried to approach all the different avenues on
that.
>> Jan Nelson: Let's show how export and import.
>> Cameron Lerum: Good point. So I'm not really comfortable sending it to the
Japanese market machine translation. So what I would do with that is I would simply
right-click it and I would say, "Send for translations." Again, it's an industry file so I'm just
going to do a file folder because I don't want to spool up my e-mail client. And I would
just put it out to, you know, wherever I'm going to put. I'll just throw it on my desktop for
now.
>> Jan Nelson: Or maybe on your Sky Drive and you've given that translator access?
>> Cameron Lerum: Or I could go to my Sky Drive....
>> Jan Nelson: There's a scenario if you think about how that might work.
>> Cameron Lerum: Yeah, go to Sky Drive, go to your translators shared folder, drop
the files in, shoot them off an e-mail saying, "Hey, these are ready for you. Let me know
when they're done." So I'll throw it I desktop for now. And then, as a translator -- Let me
get out of the demo. As a translator, I would find this on my Sky Drive account. I would
have -- This is where I should've brought this client up. When you e-mail, we put the
URL to actually do the download of the toolkit. It's embedded in it. You just click on it and
it will install just the editor for a localization machine.
>> Jan Nelson: Yeah, it will look and see do you have...
>> Cameron Lerum: [inaudible]
>> Jan Nelson: ...Visual Studio installed? You don't. Okay, we're just going to give you
the editor and so we don't burden them with a full installation of Express, say, but...
>> Cameron Lerum: Yeah.
>> Jan Nelson: ...just what they need.
>> Cameron Lerum: Yep. So and if they just hit next, next, next, they don't configure, it
will do the right thing. We've done a lot of work to make sure that happens. So here's the
file in Sky Drive. I just double-click the file. I've installed the toolkit. I'm editing. I make my
changes. And that would then result in this going from needs translation to translated
because it was human -- as soon as you keyboard it, it knows that humans are working it
and it knows that it works into a translation state.
You still may want to go to final and signed off but just sending it to translated would give
you an indication that they've touched it. Again, anything that's not new we consider
translated because we believe that most developers who are writing apps just don't want
to get caught up in the workflow. But we know there's some that really care, that really
work on the language. Maybe they have multiple friends with multiple languages and
they're producing maybe a higher dollar app, and they want to make sure that only call to
translations go out. This would enable that workflow for them. They can quickly do a
filter, and they could simply say, you know, "Show me everything that still needs a
review." And, boom, here's everything that still needs a review. So they can filter in.
Again, we've kept it lightweight but we've also given them some tools to dig through.
>> Jan Nelson: There's a nice lock state also that we should probably show.
>> Cameron Lerum: All right. So let's say like Climate Observer: that didn't get machine
translated because it was all caps. And the translation service says, "Well if it's all caps,
it probably wants to be left alone." But let's say I didn't want to leave the whole thing
alone. Let's say I have weather location. That one translated? That one wasn't
translated. Why didn't that translate? Okay.
>> Jan Nelson: It is now.
>> Cameron Lerum: It did now. So let me reset this. Maybe I only want to translate
location and I want to keep weather. So what I do is in the source I would say, "For my
source, don't translate weather." Again, this is the XLIFF standard and we show the
markups because people who are familiar with it would know what to do with it and
people who aren't wouldn't use it. But this tells our machine translation engine, "Don't
touch it," whether we're sending it out for profession translation, machine translation or
our pseudo. It says, "This is critical that you don't touch." And if I translate this now, it will
only translate the location portion of it.
Now we're not pretending that if you do languages where have verb switching, in like
Spanish, that it's always going to be in the right order. When do you this type of markup,
that's when the professional translator or language expert knows how to manipulate and
move things around. But if you have a product name that you don't want translated, this
makes it really easy. You can just mark it as "Don't translate my product name" because
it represents my company not the app so I would not want to translate.
The other option that you have also is you can say this particular resource for this
particular language should never be translated. And what this will result in -- If I were to
save this and go back to the project and build, this would not be in the resX file, in my
Japanese resX file. And the reason why is if it's not in the file, it enables fallback. So
since my neutral language is English, on a Japanese phone, running this in Japanese, I
would see sunset in English because I've said sunset should never be translated.
So we have granularity of in-string and then just the entire string. We do provide a way
to manipulate that around. So again we believe that pseudo is the best file to start
working on. You can do all your debugging work in pseudo. So what we've done is given
you the ability -- And I'm not going to demonstrate it except for bring up the UI. We've
said, "Let me apply all my locks, all my internal marker tags that I put on, let me apply
that to all of my pseudo. Get my program debugged. Mark these as 'Don't ever translate
these' like the weather, code I want for the language to come back in." And then, I can
just say, okay, "What languages do I want to apply that to?"
And I can say if I've put a lock on a string and that string has already been translated in
other languages, you either overwrite that language. In other words lose the translation
to get the lock put in place because it was wrong anyway or if I've already translated it,
I'm going to assume I did it right. Now what I can do is I can mark up a few key things
like my product name and then distribute it across all of my language XLIFF files to say,
"Everybody conform to this now," rather than having one global one that is less flexible.
And then, I can go in and [inaudible] if I wanted to on top of that.
So again really tried to keep a workflow minimal but available for people who wanted to
go farther. We figure most won't use the workflow and that's perfectly fine with us, but
we wanted to allow them to go farther if they wanted.
>> Jan Nelson: So we started out saying that this had a common relationship with
Windows Star apps as well.
>> Cameron Lerum: So that's a great question. So it's like, "You know what? I've got
this really cool tool. My phone works great. But I got the same app for the Windows
Store and I really don't want to have multiple resJ's on files or multiple resW files
because it's painful." So, let's not.
So I'm going to go ahead and just do a real simple demo app. Now we call this one Wolf.
It's kind of an older app that we did just as we were originally doing this. But Wolf, again,
is a program that is written to be localized. It's very localizable. We've put all the
resource strings in. We actually have written it in both Visual Basic, JavaScript and
Csharp just to show it works with all the languages.
Any language that uses the resX or in the Store, the JSOM or resW formats, we work
with, even C plus plus apps, even though those are more challenging. They just are. The
project structure is really strange.
>> Jan Nelson: Yeah.
>> Cameron Lerum: So what I have here is I have Wolf. And Wolf is basically kind of a
simple, fun app. And I'll make sure I’m in English here. So how many people are familiar
with the language selection in Windows 8?
I wonder why. So the way that Windows 8 works is you have language preferences
rather than language selection. So with the preference I can say, "Please show me this
language, all my apps in this language first. If they don't have resources in that
language, show it to me in the next one on my list and the next one on my list."
So what I'm going to do for this little demo here is I'm going to put English not at the top.
Let's do German because the Germans love my machine translations because it makes
their day for a good laugh.
>> Jan Nelson: Before we leave this screen, you've got English qps-ploc there, and I
think it's an interesting point that you brought up in the Windows Phone that there was
some limited pseudo-localization in the Windows OS. There's actually extensive pseudolocalization that's been shipping in the Windows OS for several releases. It just isn't
something that you find in the list; you have to ask for it.
>> Cameron Lerum: So that's a good point. I'm going to remove it temporarily to show
how you find it.
>> Jan Nelson: Yeah.
>> Cameron Lerum: Thank you.
>> Jan Nelson: You're welcome.
>> Cameron Lerum: So in Windows 8, you go to the control panel. You go to
languages. Similar to what you did in Windows 7, only now you just say, "Add a
language." And that brings up a new UI that lists all the languages that are available on
your particular machine. Up here, as everywhere in Windows, we have the search key.
Well, I can't search for pseudo and be successful but I can look for the language code.
So memorize this. It is documented but you've got to memorize it: Q-P-S dash P-L-O-C.
Got to type it right. When you type that it will then show a language that's not normally
displayed. Sir?
>>: T-L-H dash Q-A-A-K.
>> Cameron Lerum: Yeah, no thanks. [laughing] And the reason why this doesn't
normally show is pseudo is not any good for a standard user unless they're really, you
know, feeling like they want to have martyrdom.
So I'm going to go ahead and add pseudo back in. And now what I have is I have
pseudo as one of my available OS languages. So my application is going to display
pseudo-English which means anything from the operating system will show up in
pseudo, then German and then English. Now for the Wolf app it's a really simple app. I'm
just displaying images and resources from my app, so I'm not really accessing
[inaudible] controls or I'm not accessing the Internet so I won't get that variety we had in
the store app. But let me go ahead and run this. I love it when demo machines actually
work the entire time.
>> Jan Nelson: So far so good.
>> Cameron Lerum: That was a hopeful statement. So again this application -- Yeah, I
was afraid that was going to happen. That's a screen resolution issue. Let me fix my
screen. Sorry if this messes up the recording.
I need to go up or down? Let's try going up. I think maybe we're going to go down. So
what that message was is that it wasn't the resolution that Windows apps support. So
let's go down to resolution, and I believe it supports this one just fine. So we'll go ahead
and go back to VS and we'll run this again.
>> Jan Nelson: There it is.
>> Cameron Lerum: Ta-dah. So it wasn't MAT. So here's a really simple app. It's just
kind of fun, showing a bunch of dogs running around. The team was teasing me one day
so I came up with a dog app. Pretty straight forward. Nothing real fancy. You know,
standard tile, Windows 8 app. Everything is in English. No surprises there.
So again we go back into our app, and this is a C sharp Windows Store app. What menu
do we go to, to enable MAT? Tools menu, right. So we enable MAT on our tools menu
with the project selected. There's our pseudo-file. And this is that one case I was telling
you about: with Windows Store, the pseudo-file is empty until you build. We synchronize
during the build and then we inject in. So it all happens in one step but you always have
to do the build then localize and then one more build. It was a design choice we made
that has served us pretty well as long as you remember that one gottcha.
So I'm going to do just a build. So I'm just going to build the solution. And you can see
here we have successfully started and finished our build with a Multilingual App Toolkit.
That's always a good thing. And if I bring this up then I will have my pseudo in my file; it's
been populated. Pretty straight forward.
Oh, let me go back to the editor. I want to show one thing in particular. I am going to
translate into pseudo happy dogs and unhappy dogs. And that's it for this demo. And I'm
going to run this. I'll add German in, in a minute because I want to make sure we step
through everything slowly.
So now you'll see that we have the language fallback working. Remember, my OS
languages are pseudo, German then English. This application supports two resources in
pseudo and the rest in English. So that's what being displayed is the two pseudo
because they're the preferred language and then everything else is in English.
So you can also then tell where this same resource is being displayed multiple times.
See the code? If this was the same string but a different resource, it would be a different
code. So again that helps you in debugging about why is that string the same or why is
that string different. To run it in pseudo, you can identify them. And then you can actually
search on that code against your pseudo resource file and say, "Oh, it's this particular
resource name. Let me go hunt that in code." So it gives you clues.
And let's go back here and let's add German because I know I speak that so well.
>> Jan Nelson: Yeah, ist gut.
>> Cameron Lerum: [inaudible] And we'll do German. And, we don't want to get
complicated. So let's translate everything except -- Ah, see.
>> Jan Nelson: Got to build first.
>> Cameron Lerum: You've got to build first. I'm too used to the phone; you don't have
to build first. Initially it's in the phone. So let's translate everything except we want to untranslate the free-flea dogs. And why do we want to do that? Because we want to make
sure that we do actually still get fallback to English. So again translate -- build, translate,
run.
So now I have happy dogs in pseudo. I have my content in German.
>> Jan Nelson: Machine translation quality.
>> Cameron Lerum: Machine translation quality which is a great suggestion. Actually
the interesting part is the Germans laugh at it because there's grammatical errors but
when I translate to French and show it to native French speakers, they actually go,
"That's not bad."
And the Brazilians go, "That's not bad." So that's kind of encouraging. Again, if you use
machine translation I'd always just put a disclaimer, "Machine translated for your
convenience," and then provide them a link because they can download the toolkit, run
your XLIFF file and fix it for you.
>> Jan Nelson: And we'll show them that loop.
>> Cameron Lerum: And we'll show them that loop.
>> Jan Nelson: In a little bit, yeah.
>> Cameron Lerum: So here we go. This is still in English because I don't have a
translation for it. Everything else has a German translation and the two strings have
pseudo. Now let's back this off a little bit just to drill the point home. If I bring this back up
and switch my order -- So I'm going to move this up. Now I’m going to do German then
pseudo. Now what should happen here is I won't see any pseudo at all because I did
actually translate these into German, so it doesn't fall back. So again your language
fallback and your ability to do interesting things -- Like if I were to translate German,
Germany and it's just general German, it would work very well in this scenario.
Oh, sorry. And I've got my one English string still because it's still not translated. All right.
Pretty straight forward. Any questions on that? All right. And you wanted to show the
import?
>> Jan Nelson: With the suggestion coming back how people could actually give
feedback on whether or not the quality of the translation was good.
>> Cameron Lerum: Oh, okay. You mean as far as your localizer?
>> Jan Nelson: Yeah.
>> Cameron Lerum: Okay. So let's bring up our German file. What if I have it in this
one? Actually let me back up for one second.
>> Jan Nelson: Okay.
>> Cameron Lerum: I'm going to deviate from my demo and hope it doesn't bite me. So
I want to actually add -- Oh, I do have comments on here. All right. So you'll notice in
here that I have comments on my resources. These are very useful to communicate to
the person who's going to localize for you because what we do is those are comments
that we call from the developer so they'll show up right here. This is a comment to the
localizer, a pretty generic comment we threw out just as a test.
But you can write in here that this string represents this. Or maybe, it's a button so
please keep the translation short. Some type of -- what you would want to tell them
person if they're asking questions about it. Now what they can do to you is they can
actually type back. And that is, you know, this translation -- Right? How do you spell
translation? I can't type on these small keyboards -- is perfect.
And they can send this back to you. And when they do, you can open this up and you
can look at the translations and go, "You know what? I've got different translations on
here." And, "Okay, great. So this is good." Or they can say, "I don't know what this
meant." Right? The classic example we've used for years is the bat in the field. So let's
say you have a resource that said, "The bat is in the field."
What's your localizer going to come back with? "Are you talking sports or mammals?"
And you can go, "Oh, yeah. Sorry, this is a baseball app." So this would be sports
instruments so you can communicate that way which ideally would be a dev comment
you send to them initially. So you can roundtrip this and it will -- During builds, during
imports, they'll all be preserved and they'll continue to grow. The only one that changes
dynamically on your is the one that you have in your resource file. If you change that, we
will change it elsewhere because you've made an adjustment to how the system works.
But that's a great way you can communicate back and forth without having to do an email. They can send you back the file and say, "Hey, I had some questions on these
resources," and you can go find it like that.
I think that pretty much covers everything. Yeah?
>>: Is the resource ID in checkpoints on the top, does that enable the GUID?
>> Cameron Lerum: Is enabled...?
>>: The GUID displayed in the UI [inaudible]. Is that shown here by turning on the
resource ID checkpoints at the top?
>> Cameron Lerum: The GUID only shows in the -- The code you mean? The resource
tracker code? That only shows in the pseudo one.
>>: It's not available here?
>> Cameron Lerum: We could enable it. We haven't. But we could say, "What would be
the ID for this resource?" because it would generate to be the same one here. We just
haven't put it into the [inaudible] yet. Again, this is more of the translator one and we
didn’t think they'd be working with pseudo. But it might be interesting to reconsider.
If I showed my pseudo file, it would just show it as part of the string and you could then
search for it. Right? You could then search for it if you wanted and it would show up or
even filter on it. The other thing I didn't really call it is we indicate whether it was machine
translated or not. As soon as you start touching it not only did we change it to a
translated state, we take the machine translation flag off. So you can filter and say, "Hey
what's machine translated?" And I can quickly say, you know, "Sort by my column.
Here's my two strings that are still machine translated." And pseudo is machine so we
mark it as machine.
Again, that's that workflow that people may or may not use, but we wanted to enable it.
So I'm going to write an app that now has more than one language.
>>: Good answer.
>>: You also -- You showed Japanese. Is there some sort of support for phonetic or
[inaudible] designation?
>> Cameron Lerum: Not directly in the toolkit. If you wanted to do different things such
as control the sizes of maybe a dialogue box or a window or something like that, make it
a localizable field. And then, you translate it. And you've got to be careful because you
don't want to translate a number to something else. But then the translation would be,
"Grow this from 100 pixels to 200 pixels for this particular language." Obviously we
prefer you auto size but that would be how you'd do fonts and other stuff through your
localization model.
>>: I've seen websites that have community localization where you can dump your
resources and then, people come in and either translate it or they vote on the translation.
Is there -- I've never localized anything so I don't have any experience. I'm getting very
motivated though. Is that something that's easy to integrate with, those types of
websites? Maybe they export the, what is it called? XLIFF?
>> Cameron Lerum: XLIFF, yeah. So I'll take most of that answer offline.
>>: Okay.
>> Cameron Lerum: But right now the way that we integrate is through the send and
receive functionality. You can send it through e-mail. They can send it back to you and
you can import. The import will actually do some validation. So that's currently the way
that we support that.
>>: Okay.
>> Jan Nelson: And we will have an offline conversation at the end of this talk.
>>: Oh, okay.
>> Cameron Lerum: Yeah.
>> Jan Nelson: Okay.
>> Cameron Lerum: And everything we've shown here is publicly available. This is
version 1.2. You can download it today and do exactly what I've done. Nothing here is
internal to Microsoft at this point.
All right. Thank you for listening.
>> Jan Nelson: We appreciate your time.
>> Cameron Lerum: Feel free to contact either Jan or myself -- We'll give our e-mail
alias offline -- and ask any questions and so on. Or if you're going to expand into
[inaudible] for the Store or for the Phone, we definitely provide some help.
>> Jan Nelson: Or for both.
>> Cameron Lerum: Preferably for both.
>> Jan Nelson: All right, thank you very much.
>> Cameron Lerum: Thank you.
[applause]
Download