5
Developing a system for a Bolivian company, in a windows with Culture pt-BR
, some objects like datetimepicker
has its internal components according to the language in which the system was installed.
And in my case, when this system was installed in Bolivia, no windows will have as Culture es-BO
, soon would need a way via code that the Culture exchange is made so that these objects have their components with Spanish text and not with Culture and that the system was installed.
According to the documentation http://msdn.microsoft.com/en-us/library/b28bx3bh(v=vs.110). aspx this Culture exchange must occur before the components are initialized (InitializeComponent()
) with the following lines of code:
Thread.CurrentThread.CurrentCulture = new CultureInfo("es-BO");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-BO");
But even using this solution, my result remained the texts of the object all in Portuguese.
The exchange happens, but the system "automatically" returns Ulture to the initial? or am I making this change in the wrong way?
Do you want the . Net specific texts to be in Spanish? Do they appear in your application? Are the texts you created for your application ok? You used Resources or wrote the raw text in the application? The . Net installed on the machines is located in Spanish?
– Maniero
are the texts that depend on the language of the system, for example, the datetimepicker when clicked, its texts in en-br would be, example: "September", "Today", "Tuesday".
– Enzo Tiezzi
I want to exchange these texts that depend on the language of the system
– Enzo Tiezzi
Right away I can only imagine there’s a problem in deploy of the . Net on these machines, possibly missing the Resources from the . Net to
es-BO
. Do you know which languages are installed on the machine? Tried others, English for example?– Maniero
even using en-US he does not exchange.
– Enzo Tiezzi
Look inside the
C:\Windows\Microsoft.NET\Framework\vX.Y.ZZZZZ
. See if you have some folders with 4 digit names. See the numbers there. 1033 for example is theen-US
. It needs to exist for other languages. This is a possible problem. But if 1033 exists and it didn’t work withen-US
, the problem is another and I still can’t imagine what it could be.– Maniero
has the 1033, and also the 1046, which is probably the en.
– Enzo Tiezzi
That. In
es-BO
will not show even, there are no files with the texts. But still intrigues me not to have shown in English. My only experience with this was a quick test a long time ago and it had worked.– Maniero
for now, in my testing machine I put the language manually to Spanish(Bolivia), there yes everything is the way it should
– Enzo Tiezzi
@Enzotiezzi Just so I can locate myself: what is the technology of your application?
– Leonel Sanches da Silva
desktop application, doing in windows form same.
– Enzo Tiezzi