Hello guys! I read the section in the documentation. I got confused by the big amount of information and different examples given.
I got the section about the different between source and target language. This is valid for me, the source language is English, but the site will be fully in Bulgarian and there won't be other language.
What should I do?
Can I just assign the target language at the config file and use one single language file for the entire website or I should somehow put for each view translation, and what is the correct format?
If your site is using single language, you don't need to touch language and sourceLanguage since no translation need to be done. If you want to use the i81n date or number formatter, then you may set both languages to your language.
Yes, but even though, how could I translate things? I mean, the core messages. Where to specify that I want the language to be Bulgarian. Soon, or later, I will finish translating core messages in bulgarian and will use them in my site. The actual question is where to specify the current language used. In application config, but how?
If you want to make use of the core message translations, then you have to set source language as English and (target) language as Bulgarian so that automatic translation can occur.
Also, is there a way to specify {attribute} manually. I will tell you why:
Полето Username не може да бъде празно.
This is a translation of:
Field(my addition) Username cannot be blank).
But "Username" remains so, even when I translate the other words in Bulgarian. Is there a way it to be equal to the name of the label(if I succeed writing it in Bulgarian).
The second parameter of activeLabelEx must be an attribute name, not its label. An attribute name can only contain ASCII characters because it can be used like a PHP variable.
To customize attribute labels, you need to override attributeLabels() method in your AR class.
Thanks Qiang, this was the solution. I was lucky to see that my errors consist of the assigned value, not the field name, because this could have caused many troubles.