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

Localização e internacionalização

Localização e internacionalização

Adaptando seu app para onde a zoeira tem limite! Esses são alguns pontos a se atentar enquanto preparando seu app para novos idiomas e culturas. Essa apresentação foi feita no NSBrazil 2019 (https://nsbrazil.com)

Igor Castañeda Ferreira

November 09, 2019
Tweet

Other Decks in Programming

Transcript

  1. Book expedition to Mars for 2 travellers 為2位旅客訂⽕⽕星的旅程 let format

    = NSLocalizedString("booking.review", comment: “") let localizedString = String(format: format, planet, travellers) 為%2$@訂⽕%1$@的旅程 Book expedition to %1$@ for %2$@
  2. Table 1 Type Category Examples Minimal Pairs Rules cardinal zero

    0 0.0, 0.00, 0.000, 0.0000 بﺎﺗﻛ ٠ بﺎﺗﻛ ٠٫٠٠٠٠ n = 0 one 1 1.0, 1.00, 1.000, 1.0000 بﺎﺗﻛ بﺎﺗﻛ n = 1 two 2 2.0, 2.00, 2.000, 2.0000 نﺎﺑﺎﺗﻛ نﺎﺑﺎﺗﻛ n = 2 few 3~10, 103~110, 1003, … 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, … بﺗﻛ ٣ بﺗﻛ ٣٫٠ n % 100 = 3..10 many 11~26, 111, 1011, … 11.0, 12.0, 13.0, … ﺎًﺑﺎﺗﻛ ١١ ﺎًﺑﺎﺗﻛ ١١٫٠ n % 100 = 11..99 other 100~102, 200~202,… 0.1~0.9, 1.1~1.7,… بﺎﺗﻛ ١٠٠ بﺎﺗﻛ ٠٫١ ordinal other 0~15, 100, 1000, 10000, 100000, … ﺎًﻧﯾﻣﯾ ١٥ ـﻟا فطﻌﻧﻣﻟا ﻰﻟإ ﮫﺟﺗا. range zero+one 0–1 بﺎﺗﻛ ١–٠ zero + one → zero zero+two 0–2 بﺎﺗﻛ ٢–٠ zero + two → zero zero+few 0–3 بﺗﻛ ٣–٠ zero + few → few zero+many 0–11 ﺎًﺑﺎﺗﻛ ١١–٠ zero + many → many zero+other 0–100 بﺎﺗﻛ ١٠٠–٠ zero + other → other one+two 1–2 بﺎﺗﻛ ٢–١ one + two → other one+few 1–3 بﺗﻛ ٣–١ one + few → few one+many 1–11 ﺎًﺑﺎﺗﻛ ١١–١ one + many → many one+other 1–100 بﺎﺗﻛ ١٠٠–١ one + other → other two+few 2–3 بﺗﻛ ٣–٢ two + few → few two+many 2–11 ﺎًﺑﺎﺗﻛ ١١–٢ two + many → many two+other 2–100 بﺎﺗﻛ ١٠٠–٢ two + other → other few+few 3–103 بﺗﻛ ١٠٣–٣ few + few → few few+many 3–11 ﺎًﺑﺎﺗﻛ ١١–٣ few + many → many few+other 3–100 بﺎﺗﻛ ١٠٠–٣ few + other → other many+few 11–103 بﺗﻛ ١٠٣–١١ many + few → few many+many 11–111 ﺎًﺑﺎﺗﻛ ١١١–١١ many + many → many many+other 11–100 بﺎﺗﻛ ١٠٠–١١ many + other → other other+one 0.1–1 بﺎﺗﻛ ١–٠٫١ other + one → other other+two 0.1–2 بﺎﺗﻛ ٢–٠٫١ other + two → other other+few 0.1–3 بﺗﻛ ٣–٠٫١ other + few → few other+many 0.1–11 ﺎًﺑﺎﺗﻛ ١١–٠٫١ other + many → many other+other 0.1–100 بﺎﺗﻛ ١٠٠–٠٫١ other + other → other
  3. Device-Specific Strings Siri suggests stories, channels, and topics based on

    Safari and app usage. You can change this in News Preferences. Siri suggests stories, channels, and topics based on Safari and app usage. You can change this in Settings.
  4. Tom Scott: Why You Can Tweet More In Japanese: What

    Counts As A Character? https://www.youtube.com/watch?v=qOcxwRc2Epg
  5. - Uma palavra pode duplicar de tamanho em outro idioma

    - Um mesmo conceito pode ser representado de múltiplas formas - Uma tecla não significa que a String ganha mais 1 caracter - Tweets são maiores em Japonês - Seu texto pode ter múltiplos idiomas no mesmo lugar
  6. Alguns fatos legais sobre calendários: - Japão trabalha com eras,

    determinado pelo Rei - Calendário lunar Judaico pode ter ano de 12 meses ou ano de 13 meses - A semana Árabe começa no que seria nosso domingo - Nem todos os calendários Islâmicos começam no mesmo ano
  7. // Dates and Times DateFormatter DateComponentsFormatter // Calendars Calendar //

    Units and Measurements MeasurementFormatter // Numbers NumberFormatter // Names PersonNameComponentsFormatter Design For Everyone WWDC 2017 Internationalization Best Practices WWDC 2016
  8. Character Emphasis ड ड◌् राइव डि◌ ा डि◌ े ड◌ो◌ं

    गी ेन डि◌पो डि◌नर ENGLISH HINDI do dog document downtown dome doll doughnut
  9. Junte-se a nós com Orgulho! Visite Amsterdã com desconto durante

    a #PrideAMS Venha aproveitar a Europa! Viaje Amsterdã com desconto! Conteúdo Internacional: Conteúdo para usuários Árabes:
  10. Prepare seu app para Localização desde cedo Atualize seu design

    conforme mais culturas são adotadas Deixe o sistema fazer o trabalho difícil Lembre-se: Tradução vai além do texto