aidhound / hotxlfp

A Python Excel Formula Parser similar to the javascript handsontable formulaparser
MIT License
28 stars 12 forks source link

Language support #5

Open Alexmod opened 3 years ago

Alexmod commented 3 years ago

Is it possible to make language support available? Example.

p.parse('1 + IF(1>0;1;2)')
{'result': 2, 'error': None}
p.parse('1 + EСЛИ(1>0;1;2)')
{'result': None, 'error': '#NAME?'}
leonelcamara commented 3 years ago

This could be possible, do you know of a good source for the formula's names in different languages?

Alexmod commented 3 years ago

Thanks for the answer. Maybe https://en.excel-translator.de/translator/

Alexmod commented 3 years ago

https://easy-excel.com/excel-in-other-languages/

leonelcamara commented 3 years ago

@Alexmod this last one seems good enough, we can improve the lists later, I'll try to make hotxlfp localizable.

Alexmod commented 3 years ago

@leonelcamara , there's a difficulty in the separator. Different languages have different delimiters. For example. Russian СУММ(1; 2; 3) English SUM(1, 2, 3)

leonelcamara commented 3 years ago

@Alexmod hotxlfp already accepts both delimiters. I think the problem is more with locales which use commas in numbers as the decimal separator. Not sure I'll support that as I'd like to keep this behavior of accepting both commas and semicolons.