SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Volg @King_Software en twitter mee met #KingSoftware!
The global minded
programmer
Andries Nieuwenhuize
Quadrant software B.V.
September 2012
Volg @King_Software en twitter mee met #KingSoftware!
Awareness & pragmatic
.Net implementation
Case studies: 3
Agenda
Volg @King_Software en twitter mee met #KingSoftware!
Iedere programmeur
is cultureel gekleurd
Awareness
Volg @King_Software en twitter mee met #KingSoftware!
• International Domain Name Mapping
• DNS (ASCII)
• quadrant.nl | bücher.de
• punycode
– bücher > > bcher-kva
– büücher > bcher-kvaa
– www.münchhausen.at
– www.xn—mnchhausen-9db.at
Case Study 1: DNS
new IdnMapping()
.GetAscii()
.GetUnicode()
Volg @King_Software en twitter mee met #KingSoftware!
• Learned
– Globalization is more than translation
– Localized assumptions are everywhere
• Best Practice
– Let the (.Net) Framework do the talking.
– Design Localizable, do localization
afterwards.
Resumé
Volg @King_Software en twitter mee met #KingSoftware!
System.Globalization.CultureInfo
3 levels :
• Invariant (cultureel agnostisch) “” – lijkt een
beetje op Engels
• Neutral (een taal, niet gebonden tot een region)
“en”
• Specific (een taal binnen een bepaalde region)
“en-US”
.NET Building blocks (1/3)
Volg @King_Software en twitter mee met #KingSoftware!
• Thread.CurrentThread.CurrentCulture
– default culture for all classes in System.Globalization and thus affects
issues such as culture-specific formatting (such as date/time and
number/currency formats), parsing, and sorting.
• Thread.CurrentThread.CurrentUICulture
– default culture used by ResourceManagermethods and thus affects the
retrieval of user interface resources such as strings and bitmaps.
.NET Building blocks (2/3)
Volg @King_Software en twitter mee met #KingSoftware!
• CultureInfo vs. RegionInfo
• "{0} | {1}", c.NativeName, new RegionInfo(c.LCID).NativeName
– Nederlands (Nederland) | Nederland
• RegionInfo : currency
• CultureInfo (remaining parts)
• Resumé
– CurrentCulture vs. CurrentUICulture
– CultureInfo vs. RegionInfo
– Invariant vs. Neutral vs. Specific
.NET Building blocks (3/3)
Volg @King_Software en twitter mee met #KingSoftware!
Multilanguage with resources
• Thread | CurrentUICulture
• Strongly typed
Volg @King_Software en twitter mee met #KingSoftware!
Don’t
Multilanguage with resources
Trans.Found
+ search.getNumberfound()
+ Trans.Out_of
+ search.getTotalEntries();
English:
“Found 4 out of 5”;
Nederlands:
“Gevonden 4 buiten 5”;
Do
• String.Format
string.Format(Trans.FoundTotalNu
mberFoundOutOfTotalEntries,
search.getNumberfound(),
search.getTotalEntries());
“Found {0} out of {1}.”
“{0} van de {1} gevonden.”
Volg @King_Software en twitter mee met #KingSoftware!
Case Study: Format specifiers
C | D | E | F | G | N | P | R | X
var money = 123.456m;
"The money {0:C} is mine.";
Thread.CurrentThread.CurrentCulture =
new CultureInfo("en-US");
"The money {0:C3} is mine.";
Volg @King_Software en twitter mee met #KingSoftware!
Linguistic (Equals)
• IEqualityComparer<T>
• (==) equality operator | "α".Equals("β")
Lexicographic (Compare to)
• IComparable<T>
• "α".CompareTo("β")
String Collation Functions (1/3)
Compare ≠ Equals
Volg @King_Software en twitter mee met #KingSoftware!
"Æ".Equals("AE") –[en-US] > False
"Æ".Equals("AE") –[da-DK] > False
string.Compare("Æ“, "AE“)
StringComparison.CurrentCulture
[en-US]-> 0 | [da-DK]-> 1
StringComparison.InvariantCulture
[en-US]-> 0 | [da-DK]-> 0
StringComparison.Ordinal
[en-US]-> 133 | [da-DK]-> 133
String Collation Functions (2/3)
Culture ≠ Invariant ≠ Ordinal
Volg @King_Software en twitter mee met #KingSoftware!
linguistic - lexicographic
CurrentCulture 100% - 100%
+= CaseInsensitive 100% - 52%
InvariantCulture 80% - 100%
+= CaseInsensitive 80% - 41%
Ordinal 0% - 100%
+= CaseInsensitive 0% - ?
String Collation Functions (3/3)
Compare
Volg @King_Software en twitter mee met #KingSoftware!
Don’t
• Parse()
– “01/02/05”
• Jan 2 2005 US
• Feb 1 2005 UK
• Feb 5 2001 PR
China
– ToString(“YY/mm
/dd”);
DateTime
Do
• ParseExact()
• ToString(“d”)
• “d” ShortDatePattern
• “D” LongDatePattern
• “F” FullDateTimePattern
Volg @King_Software en twitter mee met #KingSoftware!
Case Study 3: “-20000.15”
zh-HK (HK$20,000.15)
• The number -20000.15 formatted as currency.
da-DK kr -20.000,15
de-AT -€ 20.000,15
ja-JP -¥20,000
es-AR $-20.000,15
en-GB -£20,000.15
es-CL -$ 20.000,15
id-ID (Rp20.000)
de-DE -20.000,15 €
Volg @King_Software en twitter mee met #KingSoftware!
• Kentekenplaten
• Postcodes
• Continent van een land
• Solution:
– Extent CultureInfo
Not covered
Volg @King_Software en twitter mee met #KingSoftware!
• Awareness:
– Be a global minded programmer!
• Pragmatic
– Let the (.Net) Framework do the talking!
• Resources, format-specifiers, cultureInfo,
invariant, ordinal.
Conclusion
Volg @King_Software en twitter mee met #KingSoftware!
• http://blogs.msdn.com/b/michkap/
• .NET Internationalization: The Developer’s Guide to Building Global
Windows and Web Applications
Consulted
Guy Smith-Ferrier

Weitere ähnliche Inhalte

Andere mochten auch

Shake para emagrecer caseiro
Shake para emagrecer caseiroShake para emagrecer caseiro
Shake para emagrecer caseiroShake de Chia
 
Jornal Hora do Sul - edição de 13/01/2012
Jornal Hora do Sul - edição de 13/01/2012Jornal Hora do Sul - edição de 13/01/2012
Jornal Hora do Sul - edição de 13/01/2012Hora do Sul
 
Carmignac: Tres lecciones que Europa debería extraer de la experiencia japonesa
Carmignac: Tres lecciones que Europa debería extraer de la  experiencia japonesaCarmignac: Tres lecciones que Europa debería extraer de la  experiencia japonesa
Carmignac: Tres lecciones que Europa debería extraer de la experiencia japonesaFinect
 
Build Your Twitter Presence and Promote Your Account
Build Your Twitter Presence and Promote Your AccountBuild Your Twitter Presence and Promote Your Account
Build Your Twitter Presence and Promote Your AccountHubSpot
 
Occupancy Cost Index 2012 AOS Studley
Occupancy Cost Index 2012 AOS StudleyOccupancy Cost Index 2012 AOS Studley
Occupancy Cost Index 2012 AOS StudleyJUAN MOSQUERA
 
SOS! Lectura Obligatòria. Chahida Haddad
SOS! Lectura Obligatòria. Chahida HaddadSOS! Lectura Obligatòria. Chahida Haddad
SOS! Lectura Obligatòria. Chahida HaddadCOBDC
 
Wawancara Bersama Narasumber
Wawancara Bersama NarasumberWawancara Bersama Narasumber
Wawancara Bersama Narasumbermel depuratum
 
2006 multinational intelligence (centcom ccc)
2006 multinational intelligence (centcom ccc)2006 multinational intelligence (centcom ccc)
2006 multinational intelligence (centcom ccc)Robert David Steele Vivas
 
Spontaneous Vertex Delivery - Normal Childbirth
Spontaneous Vertex Delivery - Normal ChildbirthSpontaneous Vertex Delivery - Normal Childbirth
Spontaneous Vertex Delivery - Normal Childbirthmeducationdotnet
 

Andere mochten auch (15)

A1 Contenedores Isla de Reciclaje Iglus Recicla
A1 Contenedores Isla de Reciclaje Iglus ReciclaA1 Contenedores Isla de Reciclaje Iglus Recicla
A1 Contenedores Isla de Reciclaje Iglus Recicla
 
La Cronica 526
La Cronica 526La Cronica 526
La Cronica 526
 
Shake para emagrecer caseiro
Shake para emagrecer caseiroShake para emagrecer caseiro
Shake para emagrecer caseiro
 
2010_Reuniao Pais Programa De Ressignificação Ierp Jequié
2010_Reuniao Pais   Programa De Ressignificação Ierp Jequié2010_Reuniao Pais   Programa De Ressignificação Ierp Jequié
2010_Reuniao Pais Programa De Ressignificação Ierp Jequié
 
Jornal Hora do Sul - edição de 13/01/2012
Jornal Hora do Sul - edição de 13/01/2012Jornal Hora do Sul - edição de 13/01/2012
Jornal Hora do Sul - edição de 13/01/2012
 
En santa maría colotepec
En santa maría colotepecEn santa maría colotepec
En santa maría colotepec
 
Carmignac: Tres lecciones que Europa debería extraer de la experiencia japonesa
Carmignac: Tres lecciones que Europa debería extraer de la  experiencia japonesaCarmignac: Tres lecciones que Europa debería extraer de la  experiencia japonesa
Carmignac: Tres lecciones que Europa debería extraer de la experiencia japonesa
 
Build Your Twitter Presence and Promote Your Account
Build Your Twitter Presence and Promote Your AccountBuild Your Twitter Presence and Promote Your Account
Build Your Twitter Presence and Promote Your Account
 
Occupancy Cost Index 2012 AOS Studley
Occupancy Cost Index 2012 AOS StudleyOccupancy Cost Index 2012 AOS Studley
Occupancy Cost Index 2012 AOS Studley
 
Nanotecnologia, biosensores, bioinstrumentacion
Nanotecnologia, biosensores, bioinstrumentacionNanotecnologia, biosensores, bioinstrumentacion
Nanotecnologia, biosensores, bioinstrumentacion
 
Autoritzacions
AutoritzacionsAutoritzacions
Autoritzacions
 
SOS! Lectura Obligatòria. Chahida Haddad
SOS! Lectura Obligatòria. Chahida HaddadSOS! Lectura Obligatòria. Chahida Haddad
SOS! Lectura Obligatòria. Chahida Haddad
 
Wawancara Bersama Narasumber
Wawancara Bersama NarasumberWawancara Bersama Narasumber
Wawancara Bersama Narasumber
 
2006 multinational intelligence (centcom ccc)
2006 multinational intelligence (centcom ccc)2006 multinational intelligence (centcom ccc)
2006 multinational intelligence (centcom ccc)
 
Spontaneous Vertex Delivery - Normal Childbirth
Spontaneous Vertex Delivery - Normal ChildbirthSpontaneous Vertex Delivery - Normal Childbirth
Spontaneous Vertex Delivery - Normal Childbirth
 

Ähnlich wie Internationalization quadrant

CloudCamp Chicago - Big Data & Cloud May 2015 - All Slides
CloudCamp Chicago - Big Data & Cloud May 2015 - All SlidesCloudCamp Chicago - Big Data & Cloud May 2015 - All Slides
CloudCamp Chicago - Big Data & Cloud May 2015 - All SlidesCloudCamp Chicago
 
Programming with Semantic Broad Data
Programming with Semantic Broad DataProgramming with Semantic Broad Data
Programming with Semantic Broad DataSteffen Staab
 
Fishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data LakeFishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data LakeArangoDB Database
 
Druid meetup @ Netflix (11/14/2018 )
Druid meetup @ Netflix  (11/14/2018 )Druid meetup @ Netflix  (11/14/2018 )
Druid meetup @ Netflix (11/14/2018 )Jaebin Yoon
 
Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...
Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...
Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...Big Data Spain
 
Parallel-Ready Java Code: Managing Mutation in an Imperative Language
Parallel-Ready Java Code: Managing Mutation in an Imperative LanguageParallel-Ready Java Code: Managing Mutation in an Imperative Language
Parallel-Ready Java Code: Managing Mutation in an Imperative LanguageMaurice Naftalin
 
Big Data Analytics 3: Machine Learning to Engage the Customer, with Apache Sp...
Big Data Analytics 3: Machine Learning to Engage the Customer, with Apache Sp...Big Data Analytics 3: Machine Learning to Engage the Customer, with Apache Sp...
Big Data Analytics 3: Machine Learning to Engage the Customer, with Apache Sp...MongoDB
 
The Apache Solr Semantic Knowledge Graph
The Apache Solr Semantic Knowledge GraphThe Apache Solr Semantic Knowledge Graph
The Apache Solr Semantic Knowledge GraphTrey Grainger
 
Juraj vysvader - Python developer's CV
Juraj vysvader - Python developer's CVJuraj vysvader - Python developer's CV
Juraj vysvader - Python developer's CVJuraj Vysvader
 
OWF14 - Big Data : The State of Machine Learning in 2014
OWF14 - Big Data : The State of Machine  Learning in 2014OWF14 - Big Data : The State of Machine  Learning in 2014
OWF14 - Big Data : The State of Machine Learning in 2014Paris Open Source Summit
 
VoxxedDays Luxembourg 2019
VoxxedDays Luxembourg 2019VoxxedDays Luxembourg 2019
VoxxedDays Luxembourg 2019Cédrick Lunven
 
The Relevance of the Apache Solr Semantic Knowledge Graph
The Relevance of the Apache Solr Semantic Knowledge GraphThe Relevance of the Apache Solr Semantic Knowledge Graph
The Relevance of the Apache Solr Semantic Knowledge GraphTrey Grainger
 
Creating multillingual apps for android
Creating multillingual apps for androidCreating multillingual apps for android
Creating multillingual apps for androidSergi Martínez
 
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...InfluxData
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsC4Media
 
Introduction to Azure DocumentDB
Introduction to Azure DocumentDBIntroduction to Azure DocumentDB
Introduction to Azure DocumentDBDenny Lee
 
Introduction to Meteor - revised edition
Introduction to Meteor - revised editionIntroduction to Meteor - revised edition
Introduction to Meteor - revised editionStephan Hochhaus
 
Solving New School with the Old School (Clojure)
Solving New School with the Old School (Clojure)Solving New School with the Old School (Clojure)
Solving New School with the Old School (Clojure)C4Media
 

Ähnlich wie Internationalization quadrant (20)

CloudCamp Chicago - Big Data & Cloud May 2015 - All Slides
CloudCamp Chicago - Big Data & Cloud May 2015 - All SlidesCloudCamp Chicago - Big Data & Cloud May 2015 - All Slides
CloudCamp Chicago - Big Data & Cloud May 2015 - All Slides
 
Formal analysis-crypto-proto
Formal analysis-crypto-protoFormal analysis-crypto-proto
Formal analysis-crypto-proto
 
Programming with Semantic Broad Data
Programming with Semantic Broad DataProgramming with Semantic Broad Data
Programming with Semantic Broad Data
 
Fishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data LakeFishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data Lake
 
Druid meetup @ Netflix (11/14/2018 )
Druid meetup @ Netflix  (11/14/2018 )Druid meetup @ Netflix  (11/14/2018 )
Druid meetup @ Netflix (11/14/2018 )
 
Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...
Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...
Fishing Graphs in a Hadoop Data Lake by Jörg Schad and Max Neunhoeffer at Big...
 
Parallel-Ready Java Code: Managing Mutation in an Imperative Language
Parallel-Ready Java Code: Managing Mutation in an Imperative LanguageParallel-Ready Java Code: Managing Mutation in an Imperative Language
Parallel-Ready Java Code: Managing Mutation in an Imperative Language
 
Big Data Analytics 3: Machine Learning to Engage the Customer, with Apache Sp...
Big Data Analytics 3: Machine Learning to Engage the Customer, with Apache Sp...Big Data Analytics 3: Machine Learning to Engage the Customer, with Apache Sp...
Big Data Analytics 3: Machine Learning to Engage the Customer, with Apache Sp...
 
The Apache Solr Semantic Knowledge Graph
The Apache Solr Semantic Knowledge GraphThe Apache Solr Semantic Knowledge Graph
The Apache Solr Semantic Knowledge Graph
 
Juraj vysvader - Python developer's CV
Juraj vysvader - Python developer's CVJuraj vysvader - Python developer's CV
Juraj vysvader - Python developer's CV
 
OWF14 - Big Data : The State of Machine Learning in 2014
OWF14 - Big Data : The State of Machine  Learning in 2014OWF14 - Big Data : The State of Machine  Learning in 2014
OWF14 - Big Data : The State of Machine Learning in 2014
 
VoxxedDays Luxembourg 2019
VoxxedDays Luxembourg 2019VoxxedDays Luxembourg 2019
VoxxedDays Luxembourg 2019
 
The Relevance of the Apache Solr Semantic Knowledge Graph
The Relevance of the Apache Solr Semantic Knowledge GraphThe Relevance of the Apache Solr Semantic Knowledge Graph
The Relevance of the Apache Solr Semantic Knowledge Graph
 
Fishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data Lake Fishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data Lake
 
Creating multillingual apps for android
Creating multillingual apps for androidCreating multillingual apps for android
Creating multillingual apps for android
 
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.js
 
Introduction to Azure DocumentDB
Introduction to Azure DocumentDBIntroduction to Azure DocumentDB
Introduction to Azure DocumentDB
 
Introduction to Meteor - revised edition
Introduction to Meteor - revised editionIntroduction to Meteor - revised edition
Introduction to Meteor - revised edition
 
Solving New School with the Old School (Clojure)
Solving New School with the Old School (Clojure)Solving New School with the Old School (Clojure)
Solving New School with the Old School (Clojure)
 

Mehr von Andries Nieuwenhuize (6)

Builder
BuilderBuilder
Builder
 
Strategy
StrategyStrategy
Strategy
 
Underscore
UnderscoreUnderscore
Underscore
 
Linq inside out
Linq inside outLinq inside out
Linq inside out
 
FSharp @ Quadrant
FSharp @ QuadrantFSharp @ Quadrant
FSharp @ Quadrant
 
Presentatie
PresentatiePresentatie
Presentatie
 

Kürzlich hochgeladen

Virat Kohli Centuries In Career Age Awards and Facts.pdf
Virat Kohli Centuries In Career Age Awards and Facts.pdfVirat Kohli Centuries In Career Age Awards and Facts.pdf
Virat Kohli Centuries In Career Age Awards and Facts.pdfkigaya33
 
'the Spring 2024- popular Fashion trends
'the Spring 2024- popular Fashion trends'the Spring 2024- popular Fashion trends
'the Spring 2024- popular Fashion trendsTangledThoughtsCO
 
Traditional vs. Modern Parenting: Unveiling the Pros and Cons for Your Child’...
Traditional vs. Modern Parenting: Unveiling the Pros and Cons for Your Child’...Traditional vs. Modern Parenting: Unveiling the Pros and Cons for Your Child’...
Traditional vs. Modern Parenting: Unveiling the Pros and Cons for Your Child’...bluetroyvictorVinay
 
8377877756 Full Enjoy @24/7 Call Girls In Mayur Vihar Delhi Ncr
8377877756 Full Enjoy @24/7 Call Girls In Mayur Vihar Delhi Ncr8377877756 Full Enjoy @24/7 Call Girls In Mayur Vihar Delhi Ncr
8377877756 Full Enjoy @24/7 Call Girls In Mayur Vihar Delhi Ncrdollysharma2066
 
《QUT毕业文凭网-认证昆士兰科技大学毕业证成绩单》
《QUT毕业文凭网-认证昆士兰科技大学毕业证成绩单》《QUT毕业文凭网-认证昆士兰科技大学毕业证成绩单》
《QUT毕业文凭网-认证昆士兰科技大学毕业证成绩单》rnrncn29
 
Uttoxeter & Cheadle Voice, Issue 122.pdf
Uttoxeter & Cheadle Voice, Issue 122.pdfUttoxeter & Cheadle Voice, Issue 122.pdf
Uttoxeter & Cheadle Voice, Issue 122.pdfNoel Sergeant
 
labradorite energetic gems for well beings.pdf
labradorite energetic gems for well beings.pdflabradorite energetic gems for well beings.pdf
labradorite energetic gems for well beings.pdfAkrati jewels inc
 
83778-876O7, Cash On Delivery Call Girls In South- EX-(Delhi) Escorts Service...
83778-876O7, Cash On Delivery Call Girls In South- EX-(Delhi) Escorts Service...83778-876O7, Cash On Delivery Call Girls In South- EX-(Delhi) Escorts Service...
83778-876O7, Cash On Delivery Call Girls In South- EX-(Delhi) Escorts Service...dollysharma2066
 
Unlocking Radiant Skin: The Ultimate Skincare Guide( beyonist)
Unlocking Radiant Skin: The Ultimate Skincare Guide( beyonist)Unlocking Radiant Skin: The Ultimate Skincare Guide( beyonist)
Unlocking Radiant Skin: The Ultimate Skincare Guide( beyonist)beyonistskincare
 
BOOK NIGHT-Call Girls In Noida City Centre Delhi ☎️ 8377877756
BOOK NIGHT-Call Girls In Noida City Centre Delhi ☎️ 8377877756BOOK NIGHT-Call Girls In Noida City Centre Delhi ☎️ 8377877756
BOOK NIGHT-Call Girls In Noida City Centre Delhi ☎️ 8377877756dollysharma2066
 
Call In girls Delhi Safdarjung Enclave/WhatsApp 🔝 97111⇛⇛47426
Call In girls Delhi Safdarjung Enclave/WhatsApp 🔝  97111⇛⇛47426Call In girls Delhi Safdarjung Enclave/WhatsApp 🔝  97111⇛⇛47426
Call In girls Delhi Safdarjung Enclave/WhatsApp 🔝 97111⇛⇛47426jennyeacort
 
Call Girls in New Friends Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in New Friends Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in New Friends Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in New Friends Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
8 Easy Ways to Keep Your Heart Healthy this Summer | Amit Kakkar Healthyway
8 Easy Ways to Keep Your Heart Healthy this Summer | Amit Kakkar Healthyway8 Easy Ways to Keep Your Heart Healthy this Summer | Amit Kakkar Healthyway
8 Easy Ways to Keep Your Heart Healthy this Summer | Amit Kakkar HealthywayAmit Kakkar Healthyway
 
Call Girls in Tughlakabad Delhi 9654467111 Shot 2000 Night 7000
Call Girls in Tughlakabad Delhi 9654467111 Shot 2000 Night 7000Call Girls in Tughlakabad Delhi 9654467111 Shot 2000 Night 7000
Call Girls in Tughlakabad Delhi 9654467111 Shot 2000 Night 7000Sapana Sha
 

Kürzlich hochgeladen (16)

Virat Kohli Centuries In Career Age Awards and Facts.pdf
Virat Kohli Centuries In Career Age Awards and Facts.pdfVirat Kohli Centuries In Career Age Awards and Facts.pdf
Virat Kohli Centuries In Career Age Awards and Facts.pdf
 
'the Spring 2024- popular Fashion trends
'the Spring 2024- popular Fashion trends'the Spring 2024- popular Fashion trends
'the Spring 2024- popular Fashion trends
 
Traditional vs. Modern Parenting: Unveiling the Pros and Cons for Your Child’...
Traditional vs. Modern Parenting: Unveiling the Pros and Cons for Your Child’...Traditional vs. Modern Parenting: Unveiling the Pros and Cons for Your Child’...
Traditional vs. Modern Parenting: Unveiling the Pros and Cons for Your Child’...
 
8377877756 Full Enjoy @24/7 Call Girls In Mayur Vihar Delhi Ncr
8377877756 Full Enjoy @24/7 Call Girls In Mayur Vihar Delhi Ncr8377877756 Full Enjoy @24/7 Call Girls In Mayur Vihar Delhi Ncr
8377877756 Full Enjoy @24/7 Call Girls In Mayur Vihar Delhi Ncr
 
《QUT毕业文凭网-认证昆士兰科技大学毕业证成绩单》
《QUT毕业文凭网-认证昆士兰科技大学毕业证成绩单》《QUT毕业文凭网-认证昆士兰科技大学毕业证成绩单》
《QUT毕业文凭网-认证昆士兰科技大学毕业证成绩单》
 
Uttoxeter & Cheadle Voice, Issue 122.pdf
Uttoxeter & Cheadle Voice, Issue 122.pdfUttoxeter & Cheadle Voice, Issue 122.pdf
Uttoxeter & Cheadle Voice, Issue 122.pdf
 
labradorite energetic gems for well beings.pdf
labradorite energetic gems for well beings.pdflabradorite energetic gems for well beings.pdf
labradorite energetic gems for well beings.pdf
 
Call Girls 9953525677 Call Girls In Delhi Call Girls 9953525677 Call Girls In...
Call Girls 9953525677 Call Girls In Delhi Call Girls 9953525677 Call Girls In...Call Girls 9953525677 Call Girls In Delhi Call Girls 9953525677 Call Girls In...
Call Girls 9953525677 Call Girls In Delhi Call Girls 9953525677 Call Girls In...
 
Stunning ➥8448380779▻ Call Girls In Jasola Vihar Delhi NCR
Stunning ➥8448380779▻ Call Girls In Jasola Vihar Delhi NCRStunning ➥8448380779▻ Call Girls In Jasola Vihar Delhi NCR
Stunning ➥8448380779▻ Call Girls In Jasola Vihar Delhi NCR
 
83778-876O7, Cash On Delivery Call Girls In South- EX-(Delhi) Escorts Service...
83778-876O7, Cash On Delivery Call Girls In South- EX-(Delhi) Escorts Service...83778-876O7, Cash On Delivery Call Girls In South- EX-(Delhi) Escorts Service...
83778-876O7, Cash On Delivery Call Girls In South- EX-(Delhi) Escorts Service...
 
Unlocking Radiant Skin: The Ultimate Skincare Guide( beyonist)
Unlocking Radiant Skin: The Ultimate Skincare Guide( beyonist)Unlocking Radiant Skin: The Ultimate Skincare Guide( beyonist)
Unlocking Radiant Skin: The Ultimate Skincare Guide( beyonist)
 
BOOK NIGHT-Call Girls In Noida City Centre Delhi ☎️ 8377877756
BOOK NIGHT-Call Girls In Noida City Centre Delhi ☎️ 8377877756BOOK NIGHT-Call Girls In Noida City Centre Delhi ☎️ 8377877756
BOOK NIGHT-Call Girls In Noida City Centre Delhi ☎️ 8377877756
 
Call In girls Delhi Safdarjung Enclave/WhatsApp 🔝 97111⇛⇛47426
Call In girls Delhi Safdarjung Enclave/WhatsApp 🔝  97111⇛⇛47426Call In girls Delhi Safdarjung Enclave/WhatsApp 🔝  97111⇛⇛47426
Call In girls Delhi Safdarjung Enclave/WhatsApp 🔝 97111⇛⇛47426
 
Call Girls in New Friends Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in New Friends Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in New Friends Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in New Friends Colony Delhi 💯Call Us 🔝8264348440🔝
 
8 Easy Ways to Keep Your Heart Healthy this Summer | Amit Kakkar Healthyway
8 Easy Ways to Keep Your Heart Healthy this Summer | Amit Kakkar Healthyway8 Easy Ways to Keep Your Heart Healthy this Summer | Amit Kakkar Healthyway
8 Easy Ways to Keep Your Heart Healthy this Summer | Amit Kakkar Healthyway
 
Call Girls in Tughlakabad Delhi 9654467111 Shot 2000 Night 7000
Call Girls in Tughlakabad Delhi 9654467111 Shot 2000 Night 7000Call Girls in Tughlakabad Delhi 9654467111 Shot 2000 Night 7000
Call Girls in Tughlakabad Delhi 9654467111 Shot 2000 Night 7000
 

Internationalization quadrant

  • 1. Volg @King_Software en twitter mee met #KingSoftware! The global minded programmer Andries Nieuwenhuize Quadrant software B.V. September 2012
  • 2. Volg @King_Software en twitter mee met #KingSoftware! Awareness & pragmatic .Net implementation Case studies: 3 Agenda
  • 3. Volg @King_Software en twitter mee met #KingSoftware! Iedere programmeur is cultureel gekleurd Awareness
  • 4. Volg @King_Software en twitter mee met #KingSoftware! • International Domain Name Mapping • DNS (ASCII) • quadrant.nl | bücher.de • punycode – bücher > > bcher-kva – büücher > bcher-kvaa – www.münchhausen.at – www.xn—mnchhausen-9db.at Case Study 1: DNS new IdnMapping() .GetAscii() .GetUnicode()
  • 5. Volg @King_Software en twitter mee met #KingSoftware! • Learned – Globalization is more than translation – Localized assumptions are everywhere • Best Practice – Let the (.Net) Framework do the talking. – Design Localizable, do localization afterwards. Resumé
  • 6. Volg @King_Software en twitter mee met #KingSoftware! System.Globalization.CultureInfo 3 levels : • Invariant (cultureel agnostisch) “” – lijkt een beetje op Engels • Neutral (een taal, niet gebonden tot een region) “en” • Specific (een taal binnen een bepaalde region) “en-US” .NET Building blocks (1/3)
  • 7. Volg @King_Software en twitter mee met #KingSoftware! • Thread.CurrentThread.CurrentCulture – default culture for all classes in System.Globalization and thus affects issues such as culture-specific formatting (such as date/time and number/currency formats), parsing, and sorting. • Thread.CurrentThread.CurrentUICulture – default culture used by ResourceManagermethods and thus affects the retrieval of user interface resources such as strings and bitmaps. .NET Building blocks (2/3)
  • 8. Volg @King_Software en twitter mee met #KingSoftware! • CultureInfo vs. RegionInfo • "{0} | {1}", c.NativeName, new RegionInfo(c.LCID).NativeName – Nederlands (Nederland) | Nederland • RegionInfo : currency • CultureInfo (remaining parts) • Resumé – CurrentCulture vs. CurrentUICulture – CultureInfo vs. RegionInfo – Invariant vs. Neutral vs. Specific .NET Building blocks (3/3)
  • 9. Volg @King_Software en twitter mee met #KingSoftware! Multilanguage with resources • Thread | CurrentUICulture • Strongly typed
  • 10. Volg @King_Software en twitter mee met #KingSoftware! Don’t Multilanguage with resources Trans.Found + search.getNumberfound() + Trans.Out_of + search.getTotalEntries(); English: “Found 4 out of 5”; Nederlands: “Gevonden 4 buiten 5”; Do • String.Format string.Format(Trans.FoundTotalNu mberFoundOutOfTotalEntries, search.getNumberfound(), search.getTotalEntries()); “Found {0} out of {1}.” “{0} van de {1} gevonden.”
  • 11. Volg @King_Software en twitter mee met #KingSoftware! Case Study: Format specifiers C | D | E | F | G | N | P | R | X var money = 123.456m; "The money {0:C} is mine."; Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); "The money {0:C3} is mine.";
  • 12. Volg @King_Software en twitter mee met #KingSoftware! Linguistic (Equals) • IEqualityComparer<T> • (==) equality operator | "α".Equals("β") Lexicographic (Compare to) • IComparable<T> • "α".CompareTo("β") String Collation Functions (1/3) Compare ≠ Equals
  • 13. Volg @King_Software en twitter mee met #KingSoftware! "Æ".Equals("AE") –[en-US] > False "Æ".Equals("AE") –[da-DK] > False string.Compare("Æ“, "AE“) StringComparison.CurrentCulture [en-US]-> 0 | [da-DK]-> 1 StringComparison.InvariantCulture [en-US]-> 0 | [da-DK]-> 0 StringComparison.Ordinal [en-US]-> 133 | [da-DK]-> 133 String Collation Functions (2/3) Culture ≠ Invariant ≠ Ordinal
  • 14. Volg @King_Software en twitter mee met #KingSoftware! linguistic - lexicographic CurrentCulture 100% - 100% += CaseInsensitive 100% - 52% InvariantCulture 80% - 100% += CaseInsensitive 80% - 41% Ordinal 0% - 100% += CaseInsensitive 0% - ? String Collation Functions (3/3) Compare
  • 15. Volg @King_Software en twitter mee met #KingSoftware! Don’t • Parse() – “01/02/05” • Jan 2 2005 US • Feb 1 2005 UK • Feb 5 2001 PR China – ToString(“YY/mm /dd”); DateTime Do • ParseExact() • ToString(“d”) • “d” ShortDatePattern • “D” LongDatePattern • “F” FullDateTimePattern
  • 16. Volg @King_Software en twitter mee met #KingSoftware! Case Study 3: “-20000.15” zh-HK (HK$20,000.15) • The number -20000.15 formatted as currency. da-DK kr -20.000,15 de-AT -€ 20.000,15 ja-JP -¥20,000 es-AR $-20.000,15 en-GB -£20,000.15 es-CL -$ 20.000,15 id-ID (Rp20.000) de-DE -20.000,15 €
  • 17. Volg @King_Software en twitter mee met #KingSoftware! • Kentekenplaten • Postcodes • Continent van een land • Solution: – Extent CultureInfo Not covered
  • 18. Volg @King_Software en twitter mee met #KingSoftware! • Awareness: – Be a global minded programmer! • Pragmatic – Let the (.Net) Framework do the talking! • Resources, format-specifiers, cultureInfo, invariant, ordinal. Conclusion
  • 19. Volg @King_Software en twitter mee met #KingSoftware! • http://blogs.msdn.com/b/michkap/ • .NET Internationalization: The Developer’s Guide to Building Global Windows and Web Applications Consulted Guy Smith-Ferrier

Hinweis der Redaktion

  1. Rood (waarschuwing of geluk?). Hoeveel maanden heeft een jaar? Hoeveel dagen heeft een jaar? Year -> 353 | 354 | 355 | 356 | 365 | 366 | 383 | 384 | 385 days! Voornaam voor de achternaam die vervolgens achter de voornaam komt. Een maand schrijf je hetzelfde wanneer deze een dag bezit. Dus, januari (in een rijtje) is gelijk aan 1 januari. – Niet in iedere taal. Windows heeft een map Program Files. Links rechts oriëntatie scherm. Iconen. CompuServe (brooddoos / mailbox) Icoon man/vrouw. Uppercasing.
  2. Domain Name Service uses 7bits ASCII-set. Een casestudy om aan te geven hoe diep culture-assumptions geworteld zitten.
  3. Localizable is configurabel voor specifieke land/cultuur aanpassingen.
  4. Het antwoord van Microsoft voor dit probleem. Sla data op in de invariant culture. Dit maakt de applicatie los van cultuurveranderingen.
  5. Op thread niveau is dit aan te passen. Maar, een nieuwe thread heeft doodleuk de default instellingen.
  6. Let op het verschil tussen deze twee. Kan voor verwarring zorgen. Kortom, er zijn drie knoppen waarmee kan woren afgestemd. Vuistregels: CurrentUICulture is enkel voor resources, RegionInfo is enkel voor Currency.
  7. Why resources? Plaatjes en strings.
  8. Vertaal het liefst de hele tekst. Geen SPOD! Hergebruik in vertalingen is bad practice. Te veel verschillen. Gebruik string.format + formatspecifiers + interpunctie!
  9. Wat kan er allemaal met format specifiers. Te veel om op te noemen, daarom een case study voor de valuta. Let op de samenwerking tussen de CurrentCulture en de CurrentUICulture! Wanneer ik mijn vermogen in dollars beheer en de Culture (niet de UI-culture!) staat op een Europees land dan worden de dollars in euro’s weergegeven!
  10. Als het gaat om collation is het belangrijk de twee totaal verschillende vormen te kunnen onderscheiden: Het ene is linguistic en houdt zich bezig met de vraag of twee zinnen taalkundig aan elkaar gelijk zijn. Het andere is lexicographic en houd zich bezig met de vraag in hoeverre twee zinnen van elkaar verschillen. Of, met de alfabetische volgorde (een volgorde impliceert verschil, ongelijkheid). "are they equal?“ vs. "which comes first?" Deze totaal verschillende uitgangspunten hebben ook totaal verschillende implementaties en side-effect e.g. Performance. Zie dit ook terug in de verschillende interfaces, die daarom ook niet van elkaar erven! Let op dat wij in het Nederlands hiervoor geen verschillende (werk)woorden hebben: vergelijken : equals vs. compare
  11. De equals methode geeft nooit problemen, gebruik wel altijd de case.insensitive i.p.v. ToUpper / ToLower. CompareTo is gevoelig voor de culturele context en de uitkomst wordt daardoor ook (mede) bepaald, of gekleurd zo men wil. Voor de GUI is dit juist gewenst, een gebruiker verwacht dit ook. De invariant optie is om maar volgens een soortje standaard cultuur te werken (toevallig engels), de ordinal is om helemaal niets met culture te doen. Puur unicode points vergelijking. -> wel snel. Een normale stringcomparisson neemt een hele bulk aan culture load mee. Dit resulteert soms in verschillende sorteringsresultaten afhankelijk van cultuurcontext. Dit hoeft geen probleem te zijn, sterker nog dit is een feature. Geef gebruikers de sortingsvolgorde die men verwacht. String.CompareOrdinal gebruikt de Unicode code points voor de vergelijking. Ordinal gebruikt de Unicode code point voor iedere letter. == en Equals zijn het zelfde. De compiler gebruikt equals wanneer “” == “” wordt gedetecteerd.
  12. Wanneer we vergelijken (compare) in de huidige cultuur is dit 100% huidige cultuur en 100% alfabetisch. Wanneer kapitalen worden genegeerd geven ongeveer dubbel zo veel karakters dezelfde waarde terug: bijv. A en a. Maar, niet in iedere taal is een uppercase gelijk aan zijn lowercase! Vandaar 52%. Voor de invariant culture geldt hetzelfde behalve dat we ons beperken tot een soort engelse subset die op enkele punten afwijkend is van andere culturen. Hier wordt dus iets aan ingeboed. De ordinal doet helemaal niets met cultuur en vergelijkt enkel de unicode code points. Heeft dus ook weinig weet van kapitalen e.d.
  13. De DateTime.Parse methode verbruikt veel resources omdat deze de inputstring vergelijkt met verschillende schema’s. Daarnaast kan een ingegeven string ambigu zijn. Hiermee wordt de integriteit (CIA) van informatie aangetast! Gebruik daarom altijd parse exact met een mask. De andere kant op geeft natuurlijk precies hetzelfde probleem. Hierbij is het de gebruiker die de datum interpreteert. Geef bij de ToString bij voorkeur patronen die een jaar, maand en dag omvatten waarbij het .Net Framework zelf kiest op welke manier er geformateerd wordt, afhankelijk van de current (UI) culture.
  14. In al de verschillende specifieke talen is het getal 20000.15 naar valuta anders geformatteerd. Let op de verschillende posities van de valutasymbool, decimaal scheidingsteken en de plaats van het min-teken. Kortom: Let the (.Net) Framework do the talking!
  15. En hiermee heeft u ook direct het overgrootte deel van al het leesvoer te pakken. Onvoorstelbaar hoe weinig informatie over dit onderwerp is te vinden.