Presentation - CFUnited Europe

advertisement
Oğuz Demirkapı
Sr. Application Developer, NicheClick Media
europe.cfunited.com
March 12th- 13th 2008






Sr. Application Developer at NicheClick Media
Coding since ‘85, CGI Programming since ’94
ColdFusion Developer since ’97
Founder and Manager (prev) of CFUG for Turkey
Interested in ColdFusion, Flex, Ajax, Frameworks, i18N,
L10N, g13N
Have big interest in epistemology
europe.cfunited.com
March 12th- 13th 2008

Preview
◦ Theory
◦ Contents

i18N Tips
◦ ColdFusion Tips (Server & Code)
◦ Database Tips

Questions & Answers
europe.cfunited.com
March 12th- 13th 2008

Do we need mutilingualism?
◦ Yes!



Time Zones
Calendars
Cultural Differences
europe.cfunited.com
March 12th- 13th 2008

What is i18N (Internationalization)?
◦ Application functions in at least two locales

What is L10N (Localization)?
◦ Process of applying a locale or language "skin" to an i18N
application

What is G11N (Globalization)?
◦ i18N & L10N
europe.cfunited.com
March 12th- 13th 2008



What is Unicode?
Why do we need to use Unicode?
ColdFusion Versions
◦ ColdFusion MX
◦ Converting ColdFusion 5 or older projects into MX is a
headache with Unicode
europe.cfunited.com
March 12th- 13th 2008




ColdFusion MX
Converting ColdFusion 5 or older projects into MX is a
headache with Unicode
ColdFusion MX
ColdFusion 8
europe.cfunited.com
March 12th- 13th 2008


Setting up your environment for multilingual applications: Code
organization, database server settings, ColdFusion server settings,
development tools etc.
DEMO
europe.cfunited.com
March 12th- 13th 2008

Code & Code Isolation
◦ Java Resource Bundle
◦ IBM ICU4J Library
◦ GNU GetText()

Database or File/XML Usage
◦ Not the best but still popular
europe.cfunited.com
March 12th- 13th 2008

Sample Applications
◦
◦
◦
◦
◦
◦
◦

Basic Techniques
File Handling
Mail Usage
Fusebox
Model-Glue
FarCry
GNU GetText()
DEMO
europe.cfunited.com
March 12th- 13th 2008

Use ColdFusion MX
◦ If possible ColdFusion MX 7.x and up



Use Updated JVM
Setting Correct Locale
Use DSN Settings
◦ MS SQL Server
◦ MS Access with Unicode Support
europe.cfunited.com
March 12th- 13th 2008


Use Unicode Capable Editor
Dreamweaver Good
◦ Support BOM

Eclipse/CFEclipse Not Bad
◦ No BOM creation
◦ OK for current files with BOM

Homesite/CFStudio Never!
◦ http://www.adobe.com/go/tn_19059
europe.cfunited.com
March 12th- 13th 2008

Use Unicode
◦ If possible with BOM support

ColdFusion MX Detect BOM
◦ If you have BOM support on your file ColdFusion understand
your locale and there is no need to use extra tags such as
cfprocessingdirective
europe.cfunited.com
March 12th- 13th 2008

ColdFusion MX Templates
◦ If there is no BOM
<cfprocessingdirective pageencoding=“utf-8">
must be included in every CFM template.
◦ Using in Application.cfm etc. does not help
europe.cfunited.com
March 12th- 13th 2008

Beware of ColdFusion Functions & Tags
◦ CFPROCESSINGDIRECTIVE, CFCONTENT, CFFILE, CFHEADER, CFHTTP, CFHTTPPARAM,
CFMAIL, CFMAILPART tags and the SETENCODING, GETENCODING, TOBASE64, TOSTRING,
URLDECODE, and URLENCODEDFORMAT functions etc.

Use encoding in Tags
<cfmail to="#user#" from="#me#" subject="Unicode Test" charset="utf-8">
<cfmailpart charset="utf-8" type="plain“>#mymailasplaintext#
</cfmailpart>
<cfmailpart charset="utf-8" type="html“>#mymailashtml#
</cfmailpart>
</cfmail>
europe.cfunited.com
March 12th- 13th 2008

Use a robust database
◦
◦
◦
◦

MS SQL Server
MySQL Server
PostgreSQL Server
Oracle
Beware of Unicode Support
◦ MySQL 4.1 and up
europe.cfunited.com
March 12th- 13th 2008

Use Right Locale
◦ UTF8 in MySQL
◦ Especially important in MySQL

Beware of Field Types
◦ SQL Server nvarchar, ntext etc.
europe.cfunited.com
March 12th- 13th 2008

Adobe Developer Center


http://www.adobe.com/devnet/coldfusion/localization_globalization.html
Globalizing ColdFusionMX
◦ Paul Hastings
◦ http://www.sustainablegis.com/blog/cfg11n/
europe.cfunited.com
March 12th- 13th 2008
?
[email protected]
(Unfortunately we do not have Unicode support on e-mail addresses.)
europe.cfunited.com
March 12th- 13th 2008
Download