Globalization

Speck has been designed to be a language neutral content management system, although it currently only works with left to right script. This means it can accept and process input in multiple languages.

Speck supports the the Unicode character set (UTF-8 encoding) with ColdFusion 6 or later and the Western European character set (ISO-8859-1 encoding) with ColdFusion 5. This support refers to interaction between the client/browser and the server via the content administration interface. Speck tells the client what encoding to expect from the server and expects the client to be nice and send requests the same encoding. It doesn't use the cfcontent tag or setEncoding() function to force the ColdFusion server to send responses or decode requests in either encoding because cfcontent clears the output buffer and setEncoding() clears values in url and/or form scope. If we used these, we'd have to insist that the spApp tag is always the first thing called on any request.

Speck does not use any special syntax when creating database tables and saving data to a database. It assumes that the database character encoding can represent all the characters supported by the interaction between the client and the server. When creating columns in database tables, Speck uses a standard character varying data type for short strings and the standard charater large object data type for long strings (the specifics for each DBMS can be found in the databases.cfg file).

If the default character encoding in your database cannot represent the range of characters supported by the browser, you will need to tell Speck to use different data types when creating columns. Otherwise data will be lost when you try to store characters that don't exist in the database's encoding. To override the default database configuration per-application, create a database section in the application configuration file and add any database configuration settings that should override the settings from the default Speck databases config. e.g.

[database]
varcharType = NVARCHAR2
varcharMaxLength = 2000
longVarcharType = NCLOB

Localization

Although the default user-interface language is English, Speck has been designed to allow additional languages to be supported without requiring code changes.

Note: unfortunately, a few hard-coded strings have snuck into the code over time. Moving them out into the user-interface strings file is not currently a #1 priority here at Speck HQ, but if you are interested in creating a language file for Speck, please get in touch and we'll prioritise it.

Other elements of localization may require code changes. For example, the date property for example assumes a Gregorian calendar and the portal framework is currently English only (though it wouldn't take a lot to fix that). If you just need to create a language specifc version of the core Speck content management system, you should be able to just create a new strings file for the user-interface. If your localization requirements go beyond that, please get in touch.

User-interface Strings

User-interface strings for a Speck application are loaded into memory from a file when the application is initialised. By default, Speck looks for a file matching the language and country parts of the locale identifier. For example, if the locale is set to "English (Australian)", Speck looks for a file called en_AU.cfg in the /speck/config/strings/ directory (Speck automagically converts old-skool CF locales to Java locale identifiers). If it can't find a file exactly matching the locale identifier, it looks for one matching the language (e.g. en.cfg) and it doesn't find that, the default strings file in /speck/config/system/ is used.

When creating a language specific strings file, you will need to consider the encoding to be used when saving the file. Speck assumes all configuration files are UTF-8 encoded unless the CF server version is 5. This doesn't make much difference to the English speaking folk out there (UTF-8 and ISO-8859-1 are both supersets of ASCII), but it's absolutely crucial that you get the file encoding right for any other language.