Saturday, January 14, 2012

Code-switching between English and Spanish

Bilinguals, and multilinguals alike, often tend to switch between languages when the opportunity arises. While sometimes this phenomenon comes from an uneasiness in a specific situation when one language better fits the needs, it is always a sheer pleasure to speak in that intermingling mode with someone else who knows the involved languages. You can directly translate idiomatics which would not make any sense in the word-by-word translation but are a genuine word game you have to decipher in real-time. Most of the time, otherwise, multilinguals have to put strict barriers between each language, thus they kill this way that freedom of speaking in tongues which can be so joyful.

Sunday, January 8, 2012

Advanced jQuery Form validation (4): Display error message for grouped fields

After having discovered conditional triggers and learnt more about where to display error messages, we are going to display an error message for a group of fields.

In that example, two fields are related and at least one of them is required. In other words, each of those two fields is required if the other is empty. These two fields can be of any type, but we'll focus here on an input text and a textarea. Of course, we could have used a radio button to indicate that specific behavior, but we would like to keep it simple on the interface and limit the number of form elements.

Sunday, December 18, 2011

Star Trek languages

The linguistic richness of the Star Trek universe is particularly important, with three main languages: Klingon (designed by the linguist Marc Okrand), Romulan (or Rihannsu invented by the author Diane Duane), and Vulcan (developped by Mark R. Gardner). Those three artlangs have their own writing system, combining beauty and strangeness.

Saturday, December 10, 2011

Check a chromosome region with jQuery validator

A chromosome region is the part of a chromosome defined either by anatomical details, especially by banding, or by its linkage groups, and divided in bands and subbands. In other words, these regions have been defined to talk about the location of a gene. The regions p and q are respectivelly used for the short arm and the long arm of the chromosome.

Here are some examples of chromosomal regions: 13q14, 1p12, 1p12.3
1p12.3 means on the short arm (p) of the chromosome 1, region 1, band 2, subband 3.

Sunday, December 4, 2011

Hyphenation on the web

Basically, hyphenation is the splitting of words with dashes at the end of text lines. By using it, the text displayed on the screen can by gracefully justified or lined-wrapped, and shown in a neat column.
Up to now, there were two ways to get them: either setting soft hyphens in HTML from the server side (telling the browser where it can cut words by inserting the ­ character) or using a javascript library to hyphenate your text on the client side. You can now do it directly with CSS3 styling.

Sunday, November 27, 2011

Multilingual text alignment with Linguee

Multilingual text alignment consists in putting face to face two texts in different languages. By text, we mean here any equivalent unity like a paragraph, a sentence, an expression or a word. This technique is used for automatic translation and gives its best results when the corpus is wide (to cover the maximum number of use cases, as it is a statistical approach) and the vocabulary reduced. 

Saturday, November 19, 2011

Advanced jQuery Form validation (3): Add conditional requirement rule for a set of checkboxes

The third article of that series about advanced jQuery Form validation deals with conditional triggers. In that particular case, we have a conditional trigger displayed as a radio button that makes a set of checkboxes required when activated, and optional when not activated.

All the checkboxes share the same name checkBoxesName[]. Note the square brackets, as we handle them with PHP on the server side, and the grouping has to be done this way.
To apply a validation rule to the set of checkboxes, the square brackets have to be used, hence the simple quotes used to delimitate their name in form validator set of rules.