How to find without dictionaries a language of a text sample? It can be accomplished by comparing frequencies of letters in a sample and in known languages. For example in polish 'a' letter is about 0.0551146 of all letters, in french it's 0.049458 and in german 0.0434701.
I created a small program in C++ that takes as an argument path to file with unknown language and print, how this language differs from languages that he knowns. The lowest result is the best match. Frequencies of letters in known languages are computed from files in samples directory.
Below is the output for checked sample and this sample (in French):
bash-3.2$ ./a.out test3.txt difference between Polish language: 0.0965482 difference between French language: 0.0442431 difference between German language: 0.0945827