Is it OK to publish a book as an undergraduate?
Go for it, and see whether you can get one of your professors to do a technical review.  That technical review, acknowledged in the preface, will lend weight to your book.  If you have professors who speak your language, think about co-authors.

Do not, however, expect to make money.  Only blockbuster textbooks make significant money for their authors.  Also, beware vanity publishing, where you pay the publisher rather than the reverse.  

If you write the book, Amazon will let you make it available free or very cheap.  (That's true for English language books; you'll need to check about other languages.)