Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Localization done bien

Localization done bien

A talk on localization, with my colleague Alejandro Cruz @ Cocoaheads Paris, April 2018

Adrien Humilière

April 12, 2018
Tweet

More Decks by Adrien Humilière

Other Decks in Programming

Transcript

  1. [correct] localisation? → Travellers won’t buy domestic tickets if they

    don’t feel the app is domestic → Conversion rate is higher if localised in customer’s language → Bad localisation is worse than no localisation
  2. Make your app feel so native in any language that

    people think it has been written in their own language.
  3. What is a locale? [language] + [formatting conventions] ON A

    [territory] USING A [codeset] Date Time Numbers Currencies Mexico France Great Britain ES FR NL EN Netherlands UTF-8 Durations UTF-16
  4. # 1 en_US Luggage en_GB Baggage Target tourists that probably

    have never traveled by train Target commuters going to London It’s not a matter of languages…
  5. ) 2 nl_NL nl_BE …or of countries alone 2 fr_BE

    " fr_FR 3 fr_CA 3 en_CA 1 en_US
  6. ahh, formatting too 4 # " jueves, 12 de abril

    7:15 PM $ 4602 MXN es_MX en_GB jeudi 12 avril 19h15 204 € fr_FR Thursday 12 April 19:15 £178
  7. and let’s not forget about typography « Je recommande l’usage

    de Trainline, surtout pour les entreprises ayant plusieurs centaines de voyages tous les mois. » Tarif : PROMOTION STANDARD " “I definitely recommend using Trainline for Business for all companies that book hundreds of trips per month.” Refund and exchange: PROMOTION STANDARD #
  8. ⚙ Verifying configuration... 7 Running with required locales ["zh-Hans", "cs",

    "es", "nb", "de", "en", "it", "pl", "pt-PT", "nl", "sv", "fr", "pt-BR", "da"] 8 Finding string keys required by scanning app source code and xibs (shelling out)... 7 Fetching latest strings from remote service... 7 : Updating local strings tables... 7 ; No translation issues detected. Complete
  9. __attribute__((annotate("returns_localized_nsstring"))) NSString *CATLocalized(NSString *key); NSString *CATLocalized(NSString *key, NSString *defaultText); NSString

    *CATLocalized(NSString *key, NSInteger count); NSString *CATLocalized(NSString *key, NSDictionary <NSString *, id> *substitutions); NSString *CATUnlocalized(NSString *);
  10. - (NSString *)nameForCarrier:(NSString *)carrier { NSString *key = [@"data.carrier." stringByAppendingString:self];

    return CATLocalized(key.lowercaseString, carrier); } __attribute__((annotate("returns_localized_nsstring"))) NSString *CATLocalized(NSString *key, NSString *defaultText);
  11. CATLocalized(@"ui.ios.exchange.passengerWarning", self.passengers.count) "You must select the passenger" "You must select

    the %{count} passengers" __attribute__((annotate("returns_localized_nsstring"))) NSString *CATLocalized(NSString *key, NSInteger count);
  12. >

  13. Write code,
 need a new translation Create key on TMS


    with en_GB translation Request translation Run i18n script of project ⚙
  14. will you flip… or not? ✅ MOST CONTROLS Segmented controls

    Progress indicators Outline views Video/timeline indicators Images Clocks Music notes Graphs
  15. D ❓ ❓ ❓ ❓ ❓ ❓ ❓ ❓ ❓

    ❓ ❓ ❓ ❓ ❓ ❓ ❓ ❓ ❓
  16. “Cancel inward of Adrien” ui.ticket.cancel + ticketPart + ui.of +

    passengerName "Cancel %{part} of %{passenger}" % « Rückfahrt von Adrien stornieren »
  17. The $1 card ending in $2 expires on $3 The

    %{type} card ending in %{lastDigit} expires on %{date}