Liquid Warning with bracket square notation

I’m using the expression below to manage a site in both french and english

{% assign data-input =[page.lang] %}

It works perfectly but when I launch Jekyll’s server, I get the following message :

Liquid Warning: Liquid syntax error (line 16): Expected id but found open_square in "{{[page.lang] }}" in index.html

Do you have any idea on how to avoid such an error message ? Thanks a lot

I don’t think you need the period before the open bracket:[page.lang]

This doesn’t really work. Yes, you don’t get any errors, but you don’t get any output either.