lxml/lxml — Issue #20: CSSSelector :lang()
Author: subzey
Created: 2011-12-09 15:21:36+00:00
State: open

I'm not very into python, please excuse me if I've picked wrong place.

I've noticed a lack of `:lang()` pseudoselector in `CSSSelector` and I have a suggestion:

```css
p:lang(en)
```

may be translated into

```xpath
//p[ancestor-or-self::*[@lang][1][starts-with(concat(lower-case(@lang), '-'), 'en-')]]
```

or, in XPath 1.0

```xpath
//p[ancestor-or-self::*[@lang][1][starts-with(concat(translate(@lang, 'EN', 'en'), '-'), 'en-')]]
```