You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Marcos Ortiz <ma...@anadat.es> on 2012/09/18 06:43:27 UTC

Force UI to be in English

Hi all

I am from Spain and I need to change the default language to English instead to take the default from the browser.

I need this in order to avoid the bad translation to Spanish.

Thanks




RE: Force UI to be in English

Posted by Marcos Ortiz <ma...@anadat.es>.
Hi Diego,

Thanks so much, i test it now!!
Regards

Marcos Ortiz




-----Mensaje original-----
De: Diego Spinola Castro [mailto:spinolacastro@gmail.com] 
Enviado el: martes, 18 de septiembre de 2012 18:43
Para: cloudstack-users@incubator.apache.org
Asunto: Re: Force UI to be in English

What i've done is set cookie regarding desired language around line 105 in
"/usr/share/cloud/management/webapps/client/index.jsp":

$.cookie("lang", "pt_BR");


Diego
2012/9/18 Marcos Ortiz <ma...@anadat.es>

> Hi all
>
> I am from Spain and I need to change the default language to English 
> instead to take the default from the browser.
>
> I need this in order to avoid the bad translation to Spanish.
>
> Thanks
>
>
>
>



Re: Force UI to be in English

Posted by Marcos Ortiz <ma...@anadat.es>.
Hi

This option do not work in this version, in index.js file are defined cookie.lang and cookie.lang.value at the top of the file.

Marcos Ortiz Fernández
IT Technical Engineer  
Anadat Consulting


El 18/09/2012, a las 19:07, "Diego Spinola Castro" <sp...@gmail.com> escribió:

> Let me know if works!
> 
> 2012/9/18 Marcos Ortiz <ma...@anadat.es>
> 
>> Ok, I have CS 3.0.4 cloud platform.
>> 
>> Marcos Ortiz Fernández
>> IT Technical Engineer
>> Anadat Consulting
>> 
>> 
>> El 18/09/2012, a las 18:45, "Diego Spinola Castro" <
>> spinolacastro@gmail.com> escribió:
>> 
>>> Important information: I'm using CS 2.2.x.
>>> 
>>> 2012/9/18 Diego Spinola Castro <sp...@gmail.com>
>>> 
>>>> What i've done is set cookie regarding desired language around line 105
>> in
>>>> "/usr/share/cloud/management/webapps/client/index.jsp":
>>>> 
>>>> $.cookie("lang", "pt_BR");
>>>> 
>>>> 
>>>> Diego
>>>> 
>>>> 2012/9/18 Marcos Ortiz <ma...@anadat.es>
>>>> 
>>>>> Hi all
>>>>> 
>>>>> I am from Spain and I need to change the default language to English
>>>>> instead to take the default from the browser.
>>>>> 
>>>>> I need this in order to avoid the bad translation to Spanish.
>>>>> 
>>>>> Thanks
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>> 
>> 
>> 
>> 



Re: Force UI to be in English

Posted by Diego Spinola Castro <sp...@gmail.com>.
Let me know if works!

2012/9/18 Marcos Ortiz <ma...@anadat.es>

> Ok, I have CS 3.0.4 cloud platform.
>
> Marcos Ortiz Fernández
> IT Technical Engineer
> Anadat Consulting
>
>
> El 18/09/2012, a las 18:45, "Diego Spinola Castro" <
> spinolacastro@gmail.com> escribió:
>
> > Important information: I'm using CS 2.2.x.
> >
> > 2012/9/18 Diego Spinola Castro <sp...@gmail.com>
> >
> >> What i've done is set cookie regarding desired language around line 105
> in
> >> "/usr/share/cloud/management/webapps/client/index.jsp":
> >>
> >> $.cookie("lang", "pt_BR");
> >>
> >>
> >> Diego
> >>
> >> 2012/9/18 Marcos Ortiz <ma...@anadat.es>
> >>
> >>> Hi all
> >>>
> >>> I am from Spain and I need to change the default language to English
> >>> instead to take the default from the browser.
> >>>
> >>> I need this in order to avoid the bad translation to Spanish.
> >>>
> >>> Thanks
> >>>
> >>>
> >>>
> >>>
> >>
>
>
>

Re: Force UI to be in English

Posted by Marcos Ortiz <ma...@anadat.es>.
Ok, I have CS 3.0.4 cloud platform.

Marcos Ortiz Fernández
IT Technical Engineer  
Anadat Consulting


El 18/09/2012, a las 18:45, "Diego Spinola Castro" <sp...@gmail.com> escribió:

> Important information: I'm using CS 2.2.x.
> 
> 2012/9/18 Diego Spinola Castro <sp...@gmail.com>
> 
>> What i've done is set cookie regarding desired language around line 105 in
>> "/usr/share/cloud/management/webapps/client/index.jsp":
>> 
>> $.cookie("lang", "pt_BR");
>> 
>> 
>> Diego
>> 
>> 2012/9/18 Marcos Ortiz <ma...@anadat.es>
>> 
>>> Hi all
>>> 
>>> I am from Spain and I need to change the default language to English
>>> instead to take the default from the browser.
>>> 
>>> I need this in order to avoid the bad translation to Spanish.
>>> 
>>> Thanks
>>> 
>>> 
>>> 
>>> 
>> 



Re: Force UI to be in English

Posted by Diego Spinola Castro <sp...@gmail.com>.
Important information: I'm using CS 2.2.x.

2012/9/18 Diego Spinola Castro <sp...@gmail.com>

> What i've done is set cookie regarding desired language around line 105 in
> "/usr/share/cloud/management/webapps/client/index.jsp":
>
> $.cookie("lang", "pt_BR");
>
>
> Diego
>
> 2012/9/18 Marcos Ortiz <ma...@anadat.es>
>
>> Hi all
>>
>> I am from Spain and I need to change the default language to English
>> instead to take the default from the browser.
>>
>> I need this in order to avoid the bad translation to Spanish.
>>
>> Thanks
>>
>>
>>
>>
>

Re: Force UI to be in English

Posted by Diego Spinola Castro <sp...@gmail.com>.
What i've done is set cookie regarding desired language around line 105 in
"/usr/share/cloud/management/webapps/client/index.jsp":

$.cookie("lang", "pt_BR");


Diego
2012/9/18 Marcos Ortiz <ma...@anadat.es>

> Hi all
>
> I am from Spain and I need to change the default language to English
> instead to take the default from the browser.
>
> I need this in order to avoid the bad translation to Spanish.
>
> Thanks
>
>
>
>

RE: Force UI to be in English

Posted by Pranav Saxena <pr...@citrix.com>.
Hi ,

Yes , the changes I proposed  in my last mail should work for an advanced zone. You could let me know if you face any problem.

 you are welcome with any doubts you have. 

Thanks & Regards,
Pranav

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es] 
Sent: Wednesday, September 26, 2012 1:49 PM
To: Pranav Saxena; cloudstack-users@incubator.apache.org
Cc: cloudstack-dev@incubator.apache.org
Subject: RE: Force UI to be in English

Hi Pranav,

Yes you are right, i wanto to accomplish all your points:

1) users are not able to add any new network
2) admin creates as many networks as he wants
3) Users should be able to view and use all the networks created by admin

Are your code lines valid for Advanced Zones?

Regards and thanks you very much for all your help


-----Mensaje original-----
De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: miércoles, 26 de septiembre de 2012 10:07
Para: cloudstack-users@incubator.apache.org
CC: cloudstack-dev@incubator.apache.org; Marcos Ortiz
Asunto: RE: Force UI to be in English


Hi,

So essentially , you want the admin to create all your networks only but the users should be able to use them . This boils down to the fact that -
1) users are not able to add any new network
2) admin creates as many networks as he wants
3) Users should be able to view and use all the networks created by admin

I believe , the solution suggested by me in my previous mail should meet all the above mentioned conditions. Let me know , if you are having any problems.

Thanks,
Pranav
-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
Sent: Tuesday, September 25, 2012 9:55 PM
To: Pranav Saxena; cloudstack-users@incubator.apache.org
Cc: cloudstack-dev@incubator.apache.org
Subject: RE: Force UI to be in English

Hi,

Thanks for your post,

I have an advanced zone and i wish that users differents of admin can´t create networks for this domains, I want to admin users pre creates all the networks and users must use them.

Thanks!

Un saludo,


 Marcos Ortiz Fernández
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          


-----Mensaje original-----
De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: viernes, 21 de septiembre de 2012 10:38
Para: cloudstack-users@incubator.apache.org
CC: cloudstack-dev@incubator.apache.org; Marcos Ortiz
Asunto: RE: Force UI to be in English

Hi,

Yes you can certainly do that. Go to you network.js file under ui/scripts folder and search for the below code snippet  ( somewhere around line 225 )  and this check  isAdmin() as shown below and put the entire logic within brackets where the check condition is put.- 

preFilter: function(args) {
                if( isAdmin() ) {               //  ADD THIS CHECK -----------------------------------------------------------------------------------------------------------
                var basicZoneExists = true; //Modifying the logic behind displaying the tabs depending on the networktype
                $.ajax({
                  url: createURL("listZones"),
                  dataType: "json",
                  async: false,
                  success: function(json) {
                    if(json.listzonesresponse.zone != null && json.listzonesresponse.zone.length > 0) {
                      zoneObjs = json.listzonesresponse.zone;
                      $(zoneObjs).each(function() {
                        if(this.networktype == "Advanced") {
                          basicZoneExists = false; // For any occurence of an Advanced zone with any combination of basic zone , the add guest network tab will be displayed
                          return false; //break each loop
                        }
                      });
                    }
                  }   // -----------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks,
Pranav

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
Sent: Friday, September 21, 2012 1:42 PM
To: <cl...@incubator.apache.org>
Cc: cloudstack-users@incubator.apache.org
Subject: Re: Force UI to be in English

Hi again

It is possible to hide the add guest network for all users except for admin?

Thanks?

Marcos Ortiz Fernández
IT Technical Engineer
Anadat Consulting


El 20/09/2012, a las 16:54, "Pranav Saxena" <pr...@citrix.com> escribió:

> No problems , you are welcome !:) Feel free to address any UI queries to me !
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 7:58 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Perfect!!!!
> 
> Thanks a lot!!!
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:13
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> Then , I guess you could try out one thing - as shown in the patch 
> below
> 1) Comment out the first line ( shown below ) where it uses browser's 
> default language ( Spanish in your case)
> 2) Leave the second line uncommented ( English one )
> 3) Comment out the 3rd and the 4th line ( dealing with Japanese and chinese ) . 
> 
>  <%--              <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->  --%>
> 
>                <option value="en"><fmt:message 
> key="label.lang.english"/></option>
> 
>            <%--    <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option 
> value="zh_CN"><fmt:message key="label.lang.chinese"/></option> --%>
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:37 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi,
> 
> Yes, but this option take the default language for the browser, in my case spanish, i need to web load by default in english instead spanish without change the browser locales.
> 
> I try your option but do not work for me.
> 
> Thanks for your help
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:03
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> You could try commenting out the below mentioned portion of the code in index. jsp file by putting <%--  and  --%>  at the beginning and at the end  as shown below   .  This will hide all the options in the drop down for selecting the language type . This works for me.
> 
> <%--                                          <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->
>                <option value="en"><fmt:message key="label.lang.english"/></option>
>                <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>                     --%>
> 
> 
> Thanks,
> Pranav
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:27 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi Mat
> 
> Do not work for me
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Matty Courtney [mailto:matty.courtney@citrix.com]
> Enviado el: jueves, 20 de septiembre de 2012 12:53
> Para: cloudstack-users@incubator.apache.org
> Asunto: Re: Force UI to be in English
> 
> I haven't had a chance to test this but you could also try changing 
> <option value="en"> to <option value="en" selected="selected"> in 
> index.jsp (as well as the changes suggested below)
> 
> 
> On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
> 
>> Hi,
>> 
>> Whit those changes, i haven´t got the combo box to display language 
>> and i can´t login
>> 
>> Regards
>> 
>> 
>> -----Mensaje original-----
>> De: Jessica Wang [mailto:Jessica.Wang@citrix.com] Enviado el: jueves,
>> 20 de septiembre de 2012 0:05
>> Para: Marcos Ortiz
>> CC: cloudstack-users@incubator.apache.org
>> Asunto: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Please try this:
>> (1) in "/ui/index.jsp":
>> replace
>> <div class="select-language">
>> with      
>> <div class="select-language" style="display:none">
>> 
>> (2) under "/client/WEB-INF/classes/resources/":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> (3) under your tomcat
>> "C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>> Sent: Tuesday, September 18, 2012 9:44 PM
>> To: Jessica Wang
>> Subject: Re: Force UI to be in English
>> 
>> I think i checked this option before and only removes the blank 
>> option but the web loads with the browser default, I need to select 
>> English option anyway.
>> 
>> Marcos Ortiz Fernández
>> IT Technical Engineer
>> Anadat Consulting
>> 
>> 
>> El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>> escribió:
>> 
>>> Marcos,
>>> 
>>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> -----Original Message-----
>>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>>> Sent: Tuesday, September 18, 2012 11:17 AM
>>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>>> Cc: cloudstack-dev@incubator.apache.org
>>> Subject: RE: Force UI to be in English
>>> 
>>> Marcos,
>>> 
>>> Cloudstack UI is using browser's default language as default.
>>> 
>>> To force UI to be in English instead of in browser's default 
>>> language, please just remove one line from your \ui\index.jsp
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> 
>>> 
>>> -----Original Message-----
>>> From: Chiradeep Vittal
>>> Sent: Monday, September 17, 2012 10:04 PM
>>> To: Jessica Wang
>>> Subject: FW: Force UI to be in English
>>> 
>>> 
>>> 
>>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>>> 
>>>> Hi all
>>>> 
>>>> I am from Spain and I need to change the default language to 
>>>> English instead to take the default from the browser.
>>>> 
>>>> I need this in order to avoid the bad translation to Spanish.
>>>> 
>>>> Thanks
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> 
> 
> 
> 







RE: Force UI to be in English

Posted by Pranav Saxena <pr...@citrix.com>.
Hi ,

Yes , the changes I proposed  in my last mail should work for an advanced zone. You could let me know if you face any problem.

 you are welcome with any doubts you have. 

Thanks & Regards,
Pranav

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es] 
Sent: Wednesday, September 26, 2012 1:49 PM
To: Pranav Saxena; cloudstack-users@incubator.apache.org
Cc: cloudstack-dev@incubator.apache.org
Subject: RE: Force UI to be in English

Hi Pranav,

Yes you are right, i wanto to accomplish all your points:

1) users are not able to add any new network
2) admin creates as many networks as he wants
3) Users should be able to view and use all the networks created by admin

Are your code lines valid for Advanced Zones?

Regards and thanks you very much for all your help


-----Mensaje original-----
De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: miércoles, 26 de septiembre de 2012 10:07
Para: cloudstack-users@incubator.apache.org
CC: cloudstack-dev@incubator.apache.org; Marcos Ortiz
Asunto: RE: Force UI to be in English


Hi,

So essentially , you want the admin to create all your networks only but the users should be able to use them . This boils down to the fact that -
1) users are not able to add any new network
2) admin creates as many networks as he wants
3) Users should be able to view and use all the networks created by admin

I believe , the solution suggested by me in my previous mail should meet all the above mentioned conditions. Let me know , if you are having any problems.

Thanks,
Pranav
-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
Sent: Tuesday, September 25, 2012 9:55 PM
To: Pranav Saxena; cloudstack-users@incubator.apache.org
Cc: cloudstack-dev@incubator.apache.org
Subject: RE: Force UI to be in English

Hi,

Thanks for your post,

I have an advanced zone and i wish that users differents of admin can´t create networks for this domains, I want to admin users pre creates all the networks and users must use them.

Thanks!

Un saludo,


 Marcos Ortiz Fernández
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          


-----Mensaje original-----
De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: viernes, 21 de septiembre de 2012 10:38
Para: cloudstack-users@incubator.apache.org
CC: cloudstack-dev@incubator.apache.org; Marcos Ortiz
Asunto: RE: Force UI to be in English

Hi,

Yes you can certainly do that. Go to you network.js file under ui/scripts folder and search for the below code snippet  ( somewhere around line 225 )  and this check  isAdmin() as shown below and put the entire logic within brackets where the check condition is put.- 

preFilter: function(args) {
                if( isAdmin() ) {               //  ADD THIS CHECK -----------------------------------------------------------------------------------------------------------
                var basicZoneExists = true; //Modifying the logic behind displaying the tabs depending on the networktype
                $.ajax({
                  url: createURL("listZones"),
                  dataType: "json",
                  async: false,
                  success: function(json) {
                    if(json.listzonesresponse.zone != null && json.listzonesresponse.zone.length > 0) {
                      zoneObjs = json.listzonesresponse.zone;
                      $(zoneObjs).each(function() {
                        if(this.networktype == "Advanced") {
                          basicZoneExists = false; // For any occurence of an Advanced zone with any combination of basic zone , the add guest network tab will be displayed
                          return false; //break each loop
                        }
                      });
                    }
                  }   // -----------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks,
Pranav

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
Sent: Friday, September 21, 2012 1:42 PM
To: <cl...@incubator.apache.org>
Cc: cloudstack-users@incubator.apache.org
Subject: Re: Force UI to be in English

Hi again

It is possible to hide the add guest network for all users except for admin?

Thanks?

Marcos Ortiz Fernández
IT Technical Engineer
Anadat Consulting


El 20/09/2012, a las 16:54, "Pranav Saxena" <pr...@citrix.com> escribió:

> No problems , you are welcome !:) Feel free to address any UI queries to me !
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 7:58 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Perfect!!!!
> 
> Thanks a lot!!!
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:13
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> Then , I guess you could try out one thing - as shown in the patch 
> below
> 1) Comment out the first line ( shown below ) where it uses browser's 
> default language ( Spanish in your case)
> 2) Leave the second line uncommented ( English one )
> 3) Comment out the 3rd and the 4th line ( dealing with Japanese and chinese ) . 
> 
>  <%--              <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->  --%>
> 
>                <option value="en"><fmt:message 
> key="label.lang.english"/></option>
> 
>            <%--    <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option 
> value="zh_CN"><fmt:message key="label.lang.chinese"/></option> --%>
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:37 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi,
> 
> Yes, but this option take the default language for the browser, in my case spanish, i need to web load by default in english instead spanish without change the browser locales.
> 
> I try your option but do not work for me.
> 
> Thanks for your help
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:03
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> You could try commenting out the below mentioned portion of the code in index. jsp file by putting <%--  and  --%>  at the beginning and at the end  as shown below   .  This will hide all the options in the drop down for selecting the language type . This works for me.
> 
> <%--                                          <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->
>                <option value="en"><fmt:message key="label.lang.english"/></option>
>                <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>                     --%>
> 
> 
> Thanks,
> Pranav
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:27 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi Mat
> 
> Do not work for me
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Matty Courtney [mailto:matty.courtney@citrix.com]
> Enviado el: jueves, 20 de septiembre de 2012 12:53
> Para: cloudstack-users@incubator.apache.org
> Asunto: Re: Force UI to be in English
> 
> I haven't had a chance to test this but you could also try changing 
> <option value="en"> to <option value="en" selected="selected"> in 
> index.jsp (as well as the changes suggested below)
> 
> 
> On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
> 
>> Hi,
>> 
>> Whit those changes, i haven´t got the combo box to display language 
>> and i can´t login
>> 
>> Regards
>> 
>> 
>> -----Mensaje original-----
>> De: Jessica Wang [mailto:Jessica.Wang@citrix.com] Enviado el: jueves,
>> 20 de septiembre de 2012 0:05
>> Para: Marcos Ortiz
>> CC: cloudstack-users@incubator.apache.org
>> Asunto: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Please try this:
>> (1) in "/ui/index.jsp":
>> replace
>> <div class="select-language">
>> with      
>> <div class="select-language" style="display:none">
>> 
>> (2) under "/client/WEB-INF/classes/resources/":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> (3) under your tomcat
>> "C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>> Sent: Tuesday, September 18, 2012 9:44 PM
>> To: Jessica Wang
>> Subject: Re: Force UI to be in English
>> 
>> I think i checked this option before and only removes the blank 
>> option but the web loads with the browser default, I need to select 
>> English option anyway.
>> 
>> Marcos Ortiz Fernández
>> IT Technical Engineer
>> Anadat Consulting
>> 
>> 
>> El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>> escribió:
>> 
>>> Marcos,
>>> 
>>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> -----Original Message-----
>>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>>> Sent: Tuesday, September 18, 2012 11:17 AM
>>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>>> Cc: cloudstack-dev@incubator.apache.org
>>> Subject: RE: Force UI to be in English
>>> 
>>> Marcos,
>>> 
>>> Cloudstack UI is using browser's default language as default.
>>> 
>>> To force UI to be in English instead of in browser's default 
>>> language, please just remove one line from your \ui\index.jsp
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> 
>>> 
>>> -----Original Message-----
>>> From: Chiradeep Vittal
>>> Sent: Monday, September 17, 2012 10:04 PM
>>> To: Jessica Wang
>>> Subject: FW: Force UI to be in English
>>> 
>>> 
>>> 
>>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>>> 
>>>> Hi all
>>>> 
>>>> I am from Spain and I need to change the default language to 
>>>> English instead to take the default from the browser.
>>>> 
>>>> I need this in order to avoid the bad translation to Spanish.
>>>> 
>>>> Thanks
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> 
> 
> 
> 







RE: Force UI to be in English

Posted by Marcos Ortiz <ma...@anadat.es>.
Hi Pranav,

Yes you are right, i wanto to accomplish all your points:

1) users are not able to add any new network
2) admin creates as many networks as he wants
3) Users should be able to view and use all the networks created by admin

Are your code lines valid for Advanced Zones?

Regards and thanks you very much for all your help


-----Mensaje original-----
De: Pranav Saxena [mailto:pranav.saxena@citrix.com] 
Enviado el: miércoles, 26 de septiembre de 2012 10:07
Para: cloudstack-users@incubator.apache.org
CC: cloudstack-dev@incubator.apache.org; Marcos Ortiz
Asunto: RE: Force UI to be in English


Hi,

So essentially , you want the admin to create all your networks only but the users should be able to use them . This boils down to the fact that -
1) users are not able to add any new network
2) admin creates as many networks as he wants
3) Users should be able to view and use all the networks created by admin

I believe , the solution suggested by me in my previous mail should meet all the above mentioned conditions. Let me know , if you are having any problems.

Thanks,
Pranav
-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
Sent: Tuesday, September 25, 2012 9:55 PM
To: Pranav Saxena; cloudstack-users@incubator.apache.org
Cc: cloudstack-dev@incubator.apache.org
Subject: RE: Force UI to be in English

Hi,

Thanks for your post,

I have an advanced zone and i wish that users differents of admin can´t create networks for this domains, I want to admin users pre creates all the networks and users must use them.

Thanks!

Un saludo,


 Marcos Ortiz Fernández
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          


-----Mensaje original-----
De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: viernes, 21 de septiembre de 2012 10:38
Para: cloudstack-users@incubator.apache.org
CC: cloudstack-dev@incubator.apache.org; Marcos Ortiz
Asunto: RE: Force UI to be in English

Hi,

Yes you can certainly do that. Go to you network.js file under ui/scripts folder and search for the below code snippet  ( somewhere around line 225 )  and this check  isAdmin() as shown below and put the entire logic within brackets where the check condition is put.- 

preFilter: function(args) {
                if( isAdmin() ) {               //  ADD THIS CHECK -----------------------------------------------------------------------------------------------------------
                var basicZoneExists = true; //Modifying the logic behind displaying the tabs depending on the networktype
                $.ajax({
                  url: createURL("listZones"),
                  dataType: "json",
                  async: false,
                  success: function(json) {
                    if(json.listzonesresponse.zone != null && json.listzonesresponse.zone.length > 0) {
                      zoneObjs = json.listzonesresponse.zone;
                      $(zoneObjs).each(function() {
                        if(this.networktype == "Advanced") {
                          basicZoneExists = false; // For any occurence of an Advanced zone with any combination of basic zone , the add guest network tab will be displayed
                          return false; //break each loop
                        }
                      });
                    }
                  }   // -----------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks,
Pranav

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
Sent: Friday, September 21, 2012 1:42 PM
To: <cl...@incubator.apache.org>
Cc: cloudstack-users@incubator.apache.org
Subject: Re: Force UI to be in English

Hi again

It is possible to hide the add guest network for all users except for admin?

Thanks?

Marcos Ortiz Fernández
IT Technical Engineer
Anadat Consulting


El 20/09/2012, a las 16:54, "Pranav Saxena" <pr...@citrix.com> escribió:

> No problems , you are welcome !:) Feel free to address any UI queries to me !
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 7:58 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Perfect!!!!
> 
> Thanks a lot!!!
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:13
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> Then , I guess you could try out one thing - as shown in the patch 
> below
> 1) Comment out the first line ( shown below ) where it uses browser's 
> default language ( Spanish in your case)
> 2) Leave the second line uncommented ( English one )
> 3) Comment out the 3rd and the 4th line ( dealing with Japanese and chinese ) . 
> 
>  <%--              <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->  --%>
> 
>                <option value="en"><fmt:message 
> key="label.lang.english"/></option>
> 
>            <%--    <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option 
> value="zh_CN"><fmt:message key="label.lang.chinese"/></option> --%>
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:37 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi,
> 
> Yes, but this option take the default language for the browser, in my case spanish, i need to web load by default in english instead spanish without change the browser locales.
> 
> I try your option but do not work for me.
> 
> Thanks for your help
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:03
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> You could try commenting out the below mentioned portion of the code in index. jsp file by putting <%--  and  --%>  at the beginning and at the end  as shown below   .  This will hide all the options in the drop down for selecting the language type . This works for me.
> 
> <%--                                          <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->
>                <option value="en"><fmt:message key="label.lang.english"/></option>
>                <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>                     --%>
> 
> 
> Thanks,
> Pranav
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:27 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi Mat
> 
> Do not work for me
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Matty Courtney [mailto:matty.courtney@citrix.com]
> Enviado el: jueves, 20 de septiembre de 2012 12:53
> Para: cloudstack-users@incubator.apache.org
> Asunto: Re: Force UI to be in English
> 
> I haven't had a chance to test this but you could also try changing 
> <option value="en"> to <option value="en" selected="selected"> in 
> index.jsp (as well as the changes suggested below)
> 
> 
> On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
> 
>> Hi,
>> 
>> Whit those changes, i haven´t got the combo box to display language 
>> and i can´t login
>> 
>> Regards
>> 
>> 
>> -----Mensaje original-----
>> De: Jessica Wang [mailto:Jessica.Wang@citrix.com] Enviado el: jueves,
>> 20 de septiembre de 2012 0:05
>> Para: Marcos Ortiz
>> CC: cloudstack-users@incubator.apache.org
>> Asunto: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Please try this:
>> (1) in "/ui/index.jsp":
>> replace
>> <div class="select-language">
>> with      
>> <div class="select-language" style="display:none">
>> 
>> (2) under "/client/WEB-INF/classes/resources/":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> (3) under your tomcat
>> "C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>> Sent: Tuesday, September 18, 2012 9:44 PM
>> To: Jessica Wang
>> Subject: Re: Force UI to be in English
>> 
>> I think i checked this option before and only removes the blank 
>> option but the web loads with the browser default, I need to select 
>> English option anyway.
>> 
>> Marcos Ortiz Fernández
>> IT Technical Engineer
>> Anadat Consulting
>> 
>> 
>> El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>> escribió:
>> 
>>> Marcos,
>>> 
>>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> -----Original Message-----
>>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>>> Sent: Tuesday, September 18, 2012 11:17 AM
>>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>>> Cc: cloudstack-dev@incubator.apache.org
>>> Subject: RE: Force UI to be in English
>>> 
>>> Marcos,
>>> 
>>> Cloudstack UI is using browser's default language as default.
>>> 
>>> To force UI to be in English instead of in browser's default 
>>> language, please just remove one line from your \ui\index.jsp
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> 
>>> 
>>> -----Original Message-----
>>> From: Chiradeep Vittal
>>> Sent: Monday, September 17, 2012 10:04 PM
>>> To: Jessica Wang
>>> Subject: FW: Force UI to be in English
>>> 
>>> 
>>> 
>>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>>> 
>>>> Hi all
>>>> 
>>>> I am from Spain and I need to change the default language to 
>>>> English instead to take the default from the browser.
>>>> 
>>>> I need this in order to avoid the bad translation to Spanish.
>>>> 
>>>> Thanks
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> 
> 
> 
> 







RE: Force UI to be in English

Posted by Marcos Ortiz <ma...@anadat.es>.
Hi Pranav,

Yes you are right, i wanto to accomplish all your points:

1) users are not able to add any new network
2) admin creates as many networks as he wants
3) Users should be able to view and use all the networks created by admin

Are your code lines valid for Advanced Zones?

Regards and thanks you very much for all your help


-----Mensaje original-----
De: Pranav Saxena [mailto:pranav.saxena@citrix.com] 
Enviado el: miércoles, 26 de septiembre de 2012 10:07
Para: cloudstack-users@incubator.apache.org
CC: cloudstack-dev@incubator.apache.org; Marcos Ortiz
Asunto: RE: Force UI to be in English


Hi,

So essentially , you want the admin to create all your networks only but the users should be able to use them . This boils down to the fact that -
1) users are not able to add any new network
2) admin creates as many networks as he wants
3) Users should be able to view and use all the networks created by admin

I believe , the solution suggested by me in my previous mail should meet all the above mentioned conditions. Let me know , if you are having any problems.

Thanks,
Pranav
-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
Sent: Tuesday, September 25, 2012 9:55 PM
To: Pranav Saxena; cloudstack-users@incubator.apache.org
Cc: cloudstack-dev@incubator.apache.org
Subject: RE: Force UI to be in English

Hi,

Thanks for your post,

I have an advanced zone and i wish that users differents of admin can´t create networks for this domains, I want to admin users pre creates all the networks and users must use them.

Thanks!

Un saludo,


 Marcos Ortiz Fernández
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          


-----Mensaje original-----
De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: viernes, 21 de septiembre de 2012 10:38
Para: cloudstack-users@incubator.apache.org
CC: cloudstack-dev@incubator.apache.org; Marcos Ortiz
Asunto: RE: Force UI to be in English

Hi,

Yes you can certainly do that. Go to you network.js file under ui/scripts folder and search for the below code snippet  ( somewhere around line 225 )  and this check  isAdmin() as shown below and put the entire logic within brackets where the check condition is put.- 

preFilter: function(args) {
                if( isAdmin() ) {               //  ADD THIS CHECK -----------------------------------------------------------------------------------------------------------
                var basicZoneExists = true; //Modifying the logic behind displaying the tabs depending on the networktype
                $.ajax({
                  url: createURL("listZones"),
                  dataType: "json",
                  async: false,
                  success: function(json) {
                    if(json.listzonesresponse.zone != null && json.listzonesresponse.zone.length > 0) {
                      zoneObjs = json.listzonesresponse.zone;
                      $(zoneObjs).each(function() {
                        if(this.networktype == "Advanced") {
                          basicZoneExists = false; // For any occurence of an Advanced zone with any combination of basic zone , the add guest network tab will be displayed
                          return false; //break each loop
                        }
                      });
                    }
                  }   // -----------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks,
Pranav

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
Sent: Friday, September 21, 2012 1:42 PM
To: <cl...@incubator.apache.org>
Cc: cloudstack-users@incubator.apache.org
Subject: Re: Force UI to be in English

Hi again

It is possible to hide the add guest network for all users except for admin?

Thanks?

Marcos Ortiz Fernández
IT Technical Engineer
Anadat Consulting


El 20/09/2012, a las 16:54, "Pranav Saxena" <pr...@citrix.com> escribió:

> No problems , you are welcome !:) Feel free to address any UI queries to me !
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 7:58 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Perfect!!!!
> 
> Thanks a lot!!!
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:13
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> Then , I guess you could try out one thing - as shown in the patch 
> below
> 1) Comment out the first line ( shown below ) where it uses browser's 
> default language ( Spanish in your case)
> 2) Leave the second line uncommented ( English one )
> 3) Comment out the 3rd and the 4th line ( dealing with Japanese and chinese ) . 
> 
>  <%--              <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->  --%>
> 
>                <option value="en"><fmt:message 
> key="label.lang.english"/></option>
> 
>            <%--    <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option 
> value="zh_CN"><fmt:message key="label.lang.chinese"/></option> --%>
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:37 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi,
> 
> Yes, but this option take the default language for the browser, in my case spanish, i need to web load by default in english instead spanish without change the browser locales.
> 
> I try your option but do not work for me.
> 
> Thanks for your help
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:03
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> You could try commenting out the below mentioned portion of the code in index. jsp file by putting <%--  and  --%>  at the beginning and at the end  as shown below   .  This will hide all the options in the drop down for selecting the language type . This works for me.
> 
> <%--                                          <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->
>                <option value="en"><fmt:message key="label.lang.english"/></option>
>                <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>                     --%>
> 
> 
> Thanks,
> Pranav
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:27 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi Mat
> 
> Do not work for me
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Matty Courtney [mailto:matty.courtney@citrix.com]
> Enviado el: jueves, 20 de septiembre de 2012 12:53
> Para: cloudstack-users@incubator.apache.org
> Asunto: Re: Force UI to be in English
> 
> I haven't had a chance to test this but you could also try changing 
> <option value="en"> to <option value="en" selected="selected"> in 
> index.jsp (as well as the changes suggested below)
> 
> 
> On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
> 
>> Hi,
>> 
>> Whit those changes, i haven´t got the combo box to display language 
>> and i can´t login
>> 
>> Regards
>> 
>> 
>> -----Mensaje original-----
>> De: Jessica Wang [mailto:Jessica.Wang@citrix.com] Enviado el: jueves,
>> 20 de septiembre de 2012 0:05
>> Para: Marcos Ortiz
>> CC: cloudstack-users@incubator.apache.org
>> Asunto: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Please try this:
>> (1) in "/ui/index.jsp":
>> replace
>> <div class="select-language">
>> with      
>> <div class="select-language" style="display:none">
>> 
>> (2) under "/client/WEB-INF/classes/resources/":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> (3) under your tomcat
>> "C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>> Sent: Tuesday, September 18, 2012 9:44 PM
>> To: Jessica Wang
>> Subject: Re: Force UI to be in English
>> 
>> I think i checked this option before and only removes the blank 
>> option but the web loads with the browser default, I need to select 
>> English option anyway.
>> 
>> Marcos Ortiz Fernández
>> IT Technical Engineer
>> Anadat Consulting
>> 
>> 
>> El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>> escribió:
>> 
>>> Marcos,
>>> 
>>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> -----Original Message-----
>>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>>> Sent: Tuesday, September 18, 2012 11:17 AM
>>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>>> Cc: cloudstack-dev@incubator.apache.org
>>> Subject: RE: Force UI to be in English
>>> 
>>> Marcos,
>>> 
>>> Cloudstack UI is using browser's default language as default.
>>> 
>>> To force UI to be in English instead of in browser's default 
>>> language, please just remove one line from your \ui\index.jsp
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> 
>>> 
>>> -----Original Message-----
>>> From: Chiradeep Vittal
>>> Sent: Monday, September 17, 2012 10:04 PM
>>> To: Jessica Wang
>>> Subject: FW: Force UI to be in English
>>> 
>>> 
>>> 
>>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>>> 
>>>> Hi all
>>>> 
>>>> I am from Spain and I need to change the default language to 
>>>> English instead to take the default from the browser.
>>>> 
>>>> I need this in order to avoid the bad translation to Spanish.
>>>> 
>>>> Thanks
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> 
> 
> 
> 







RE: Force UI to be in English

Posted by Pranav Saxena <pr...@citrix.com>.
Hi,

So essentially , you want the admin to create all your networks only but the users should be able to use them . This boils down to the fact that - 
1) users are not able to add any new network
2) admin creates as many networks as he wants
3) Users should be able to view and use all the networks created by admin

I believe , the solution suggested by me in my previous mail should meet all the above mentioned conditions. Let me know , if you are having any problems.

Thanks,
Pranav
-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es] 
Sent: Tuesday, September 25, 2012 9:55 PM
To: Pranav Saxena; cloudstack-users@incubator.apache.org
Cc: cloudstack-dev@incubator.apache.org
Subject: RE: Force UI to be in English

Hi,

Thanks for your post,

I have an advanced zone and i wish that users differents of admin can´t create networks for this domains, I want to admin users pre creates all the networks and users must use them.

Thanks!

Un saludo,


 Marcos Ortiz Fernández
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          


-----Mensaje original-----
De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: viernes, 21 de septiembre de 2012 10:38
Para: cloudstack-users@incubator.apache.org
CC: cloudstack-dev@incubator.apache.org; Marcos Ortiz
Asunto: RE: Force UI to be in English

Hi,

Yes you can certainly do that. Go to you network.js file under ui/scripts folder and search for the below code snippet  ( somewhere around line 225 )  and this check  isAdmin() as shown below and put the entire logic within brackets where the check condition is put.- 

preFilter: function(args) {
                if( isAdmin() ) {               //  ADD THIS CHECK -----------------------------------------------------------------------------------------------------------
                var basicZoneExists = true; //Modifying the logic behind displaying the tabs depending on the networktype
                $.ajax({
                  url: createURL("listZones"),
                  dataType: "json",
                  async: false,
                  success: function(json) {
                    if(json.listzonesresponse.zone != null && json.listzonesresponse.zone.length > 0) {
                      zoneObjs = json.listzonesresponse.zone;
                      $(zoneObjs).each(function() {
                        if(this.networktype == "Advanced") {
                          basicZoneExists = false; // For any occurence of an Advanced zone with any combination of basic zone , the add guest network tab will be displayed
                          return false; //break each loop
                        }
                      });
                    }
                  }   // -----------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks,
Pranav

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
Sent: Friday, September 21, 2012 1:42 PM
To: <cl...@incubator.apache.org>
Cc: cloudstack-users@incubator.apache.org
Subject: Re: Force UI to be in English

Hi again

It is possible to hide the add guest network for all users except for admin?

Thanks?

Marcos Ortiz Fernández
IT Technical Engineer
Anadat Consulting


El 20/09/2012, a las 16:54, "Pranav Saxena" <pr...@citrix.com> escribió:

> No problems , you are welcome !:) Feel free to address any UI queries to me !
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 7:58 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Perfect!!!!
> 
> Thanks a lot!!!
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:13
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> Then , I guess you could try out one thing - as shown in the patch 
> below
> 1) Comment out the first line ( shown below ) where it uses browser's 
> default language ( Spanish in your case)
> 2) Leave the second line uncommented ( English one )
> 3) Comment out the 3rd and the 4th line ( dealing with Japanese and chinese ) . 
> 
>  <%--              <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->  --%>
> 
>                <option value="en"><fmt:message 
> key="label.lang.english"/></option>
> 
>            <%--    <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option 
> value="zh_CN"><fmt:message key="label.lang.chinese"/></option> --%>
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:37 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi,
> 
> Yes, but this option take the default language for the browser, in my case spanish, i need to web load by default in english instead spanish without change the browser locales.
> 
> I try your option but do not work for me.
> 
> Thanks for your help
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:03
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> You could try commenting out the below mentioned portion of the code in index. jsp file by putting <%--  and  --%>  at the beginning and at the end  as shown below   .  This will hide all the options in the drop down for selecting the language type . This works for me.
> 
> <%--                                          <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->
>                <option value="en"><fmt:message key="label.lang.english"/></option>
>                <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>                     --%>
> 
> 
> Thanks,
> Pranav
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:27 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi Mat
> 
> Do not work for me
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Matty Courtney [mailto:matty.courtney@citrix.com]
> Enviado el: jueves, 20 de septiembre de 2012 12:53
> Para: cloudstack-users@incubator.apache.org
> Asunto: Re: Force UI to be in English
> 
> I haven't had a chance to test this but you could also try changing 
> <option value="en"> to <option value="en" selected="selected"> in 
> index.jsp (as well as the changes suggested below)
> 
> 
> On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
> 
>> Hi,
>> 
>> Whit those changes, i haven´t got the combo box to display language 
>> and i can´t login
>> 
>> Regards
>> 
>> 
>> -----Mensaje original-----
>> De: Jessica Wang [mailto:Jessica.Wang@citrix.com] Enviado el: jueves,
>> 20 de septiembre de 2012 0:05
>> Para: Marcos Ortiz
>> CC: cloudstack-users@incubator.apache.org
>> Asunto: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Please try this:
>> (1) in "/ui/index.jsp":
>> replace
>> <div class="select-language">
>> with      
>> <div class="select-language" style="display:none">
>> 
>> (2) under "/client/WEB-INF/classes/resources/":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> (3) under your tomcat
>> "C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>> Sent: Tuesday, September 18, 2012 9:44 PM
>> To: Jessica Wang
>> Subject: Re: Force UI to be in English
>> 
>> I think i checked this option before and only removes the blank 
>> option but the web loads with the browser default, I need to select 
>> English option anyway.
>> 
>> Marcos Ortiz Fernández
>> IT Technical Engineer
>> Anadat Consulting
>> 
>> 
>> El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>> escribió:
>> 
>>> Marcos,
>>> 
>>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> -----Original Message-----
>>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>>> Sent: Tuesday, September 18, 2012 11:17 AM
>>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>>> Cc: cloudstack-dev@incubator.apache.org
>>> Subject: RE: Force UI to be in English
>>> 
>>> Marcos,
>>> 
>>> Cloudstack UI is using browser's default language as default.
>>> 
>>> To force UI to be in English instead of in browser's default 
>>> language, please just remove one line from your \ui\index.jsp
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> 
>>> 
>>> -----Original Message-----
>>> From: Chiradeep Vittal
>>> Sent: Monday, September 17, 2012 10:04 PM
>>> To: Jessica Wang
>>> Subject: FW: Force UI to be in English
>>> 
>>> 
>>> 
>>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>>> 
>>>> Hi all
>>>> 
>>>> I am from Spain and I need to change the default language to 
>>>> English instead to take the default from the browser.
>>>> 
>>>> I need this in order to avoid the bad translation to Spanish.
>>>> 
>>>> Thanks
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> 
> 
> 
> 





RE: Force UI to be in English

Posted by Pranav Saxena <pr...@citrix.com>.
Hi,

So essentially , you want the admin to create all your networks only but the users should be able to use them . This boils down to the fact that - 
1) users are not able to add any new network
2) admin creates as many networks as he wants
3) Users should be able to view and use all the networks created by admin

I believe , the solution suggested by me in my previous mail should meet all the above mentioned conditions. Let me know , if you are having any problems.

Thanks,
Pranav
-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es] 
Sent: Tuesday, September 25, 2012 9:55 PM
To: Pranav Saxena; cloudstack-users@incubator.apache.org
Cc: cloudstack-dev@incubator.apache.org
Subject: RE: Force UI to be in English

Hi,

Thanks for your post,

I have an advanced zone and i wish that users differents of admin can´t create networks for this domains, I want to admin users pre creates all the networks and users must use them.

Thanks!

Un saludo,


 Marcos Ortiz Fernández
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          


-----Mensaje original-----
De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: viernes, 21 de septiembre de 2012 10:38
Para: cloudstack-users@incubator.apache.org
CC: cloudstack-dev@incubator.apache.org; Marcos Ortiz
Asunto: RE: Force UI to be in English

Hi,

Yes you can certainly do that. Go to you network.js file under ui/scripts folder and search for the below code snippet  ( somewhere around line 225 )  and this check  isAdmin() as shown below and put the entire logic within brackets where the check condition is put.- 

preFilter: function(args) {
                if( isAdmin() ) {               //  ADD THIS CHECK -----------------------------------------------------------------------------------------------------------
                var basicZoneExists = true; //Modifying the logic behind displaying the tabs depending on the networktype
                $.ajax({
                  url: createURL("listZones"),
                  dataType: "json",
                  async: false,
                  success: function(json) {
                    if(json.listzonesresponse.zone != null && json.listzonesresponse.zone.length > 0) {
                      zoneObjs = json.listzonesresponse.zone;
                      $(zoneObjs).each(function() {
                        if(this.networktype == "Advanced") {
                          basicZoneExists = false; // For any occurence of an Advanced zone with any combination of basic zone , the add guest network tab will be displayed
                          return false; //break each loop
                        }
                      });
                    }
                  }   // -----------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks,
Pranav

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
Sent: Friday, September 21, 2012 1:42 PM
To: <cl...@incubator.apache.org>
Cc: cloudstack-users@incubator.apache.org
Subject: Re: Force UI to be in English

Hi again

It is possible to hide the add guest network for all users except for admin?

Thanks?

Marcos Ortiz Fernández
IT Technical Engineer
Anadat Consulting


El 20/09/2012, a las 16:54, "Pranav Saxena" <pr...@citrix.com> escribió:

> No problems , you are welcome !:) Feel free to address any UI queries to me !
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 7:58 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Perfect!!!!
> 
> Thanks a lot!!!
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:13
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> Then , I guess you could try out one thing - as shown in the patch 
> below
> 1) Comment out the first line ( shown below ) where it uses browser's 
> default language ( Spanish in your case)
> 2) Leave the second line uncommented ( English one )
> 3) Comment out the 3rd and the 4th line ( dealing with Japanese and chinese ) . 
> 
>  <%--              <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->  --%>
> 
>                <option value="en"><fmt:message 
> key="label.lang.english"/></option>
> 
>            <%--    <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option 
> value="zh_CN"><fmt:message key="label.lang.chinese"/></option> --%>
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:37 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi,
> 
> Yes, but this option take the default language for the browser, in my case spanish, i need to web load by default in english instead spanish without change the browser locales.
> 
> I try your option but do not work for me.
> 
> Thanks for your help
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:03
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> You could try commenting out the below mentioned portion of the code in index. jsp file by putting <%--  and  --%>  at the beginning and at the end  as shown below   .  This will hide all the options in the drop down for selecting the language type . This works for me.
> 
> <%--                                          <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->
>                <option value="en"><fmt:message key="label.lang.english"/></option>
>                <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>                     --%>
> 
> 
> Thanks,
> Pranav
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:27 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi Mat
> 
> Do not work for me
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Matty Courtney [mailto:matty.courtney@citrix.com]
> Enviado el: jueves, 20 de septiembre de 2012 12:53
> Para: cloudstack-users@incubator.apache.org
> Asunto: Re: Force UI to be in English
> 
> I haven't had a chance to test this but you could also try changing 
> <option value="en"> to <option value="en" selected="selected"> in 
> index.jsp (as well as the changes suggested below)
> 
> 
> On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
> 
>> Hi,
>> 
>> Whit those changes, i haven´t got the combo box to display language 
>> and i can´t login
>> 
>> Regards
>> 
>> 
>> -----Mensaje original-----
>> De: Jessica Wang [mailto:Jessica.Wang@citrix.com] Enviado el: jueves,
>> 20 de septiembre de 2012 0:05
>> Para: Marcos Ortiz
>> CC: cloudstack-users@incubator.apache.org
>> Asunto: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Please try this:
>> (1) in "/ui/index.jsp":
>> replace
>> <div class="select-language">
>> with      
>> <div class="select-language" style="display:none">
>> 
>> (2) under "/client/WEB-INF/classes/resources/":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> (3) under your tomcat
>> "C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>> Sent: Tuesday, September 18, 2012 9:44 PM
>> To: Jessica Wang
>> Subject: Re: Force UI to be in English
>> 
>> I think i checked this option before and only removes the blank 
>> option but the web loads with the browser default, I need to select 
>> English option anyway.
>> 
>> Marcos Ortiz Fernández
>> IT Technical Engineer
>> Anadat Consulting
>> 
>> 
>> El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>> escribió:
>> 
>>> Marcos,
>>> 
>>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> -----Original Message-----
>>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>>> Sent: Tuesday, September 18, 2012 11:17 AM
>>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>>> Cc: cloudstack-dev@incubator.apache.org
>>> Subject: RE: Force UI to be in English
>>> 
>>> Marcos,
>>> 
>>> Cloudstack UI is using browser's default language as default.
>>> 
>>> To force UI to be in English instead of in browser's default 
>>> language, please just remove one line from your \ui\index.jsp
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> 
>>> 
>>> -----Original Message-----
>>> From: Chiradeep Vittal
>>> Sent: Monday, September 17, 2012 10:04 PM
>>> To: Jessica Wang
>>> Subject: FW: Force UI to be in English
>>> 
>>> 
>>> 
>>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>>> 
>>>> Hi all
>>>> 
>>>> I am from Spain and I need to change the default language to 
>>>> English instead to take the default from the browser.
>>>> 
>>>> I need this in order to avoid the bad translation to Spanish.
>>>> 
>>>> Thanks
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> 
> 
> 
> 





RE: Force UI to be in English

Posted by Marcos Ortiz <ma...@anadat.es>.
Hi,

Thanks for your post,

I have an advanced zone and i wish that users differents of admin can´t create networks for this domains, I want to admin users pre creates all the networks and users must use them.

Thanks!

Un saludo,


 Marcos Ortiz Fernández                  
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          


-----Mensaje original-----
De: Pranav Saxena [mailto:pranav.saxena@citrix.com] 
Enviado el: viernes, 21 de septiembre de 2012 10:38
Para: cloudstack-users@incubator.apache.org
CC: cloudstack-dev@incubator.apache.org; Marcos Ortiz
Asunto: RE: Force UI to be in English

Hi,

Yes you can certainly do that. Go to you network.js file under ui/scripts folder and search for the below code snippet  ( somewhere around line 225 )  and this check  isAdmin() as shown below and put the entire logic within brackets where the check condition is put.- 

preFilter: function(args) {
                if( isAdmin() ) {               //  ADD THIS CHECK -----------------------------------------------------------------------------------------------------------
                var basicZoneExists = true; //Modifying the logic behind displaying the tabs depending on the networktype
                $.ajax({
                  url: createURL("listZones"),
                  dataType: "json",
                  async: false,
                  success: function(json) {
                    if(json.listzonesresponse.zone != null && json.listzonesresponse.zone.length > 0) {
                      zoneObjs = json.listzonesresponse.zone;
                      $(zoneObjs).each(function() {
                        if(this.networktype == "Advanced") {
                          basicZoneExists = false; // For any occurence of an Advanced zone with any combination of basic zone , the add guest network tab will be displayed
                          return false; //break each loop
                        }
                      });
                    }
                  }   // -----------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks,
Pranav

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
Sent: Friday, September 21, 2012 1:42 PM
To: <cl...@incubator.apache.org>
Cc: cloudstack-users@incubator.apache.org
Subject: Re: Force UI to be in English

Hi again

It is possible to hide the add guest network for all users except for admin?

Thanks?

Marcos Ortiz Fernández
IT Technical Engineer
Anadat Consulting


El 20/09/2012, a las 16:54, "Pranav Saxena" <pr...@citrix.com> escribió:

> No problems , you are welcome !:) Feel free to address any UI queries to me !
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 7:58 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Perfect!!!!
> 
> Thanks a lot!!!
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:13
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> Then , I guess you could try out one thing - as shown in the patch 
> below
> 1) Comment out the first line ( shown below ) where it uses browser's 
> default language ( Spanish in your case)
> 2) Leave the second line uncommented ( English one )
> 3) Comment out the 3rd and the 4th line ( dealing with Japanese and chinese ) . 
> 
>  <%--              <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->  --%>
> 
>                <option value="en"><fmt:message 
> key="label.lang.english"/></option>
> 
>            <%--    <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option 
> value="zh_CN"><fmt:message key="label.lang.chinese"/></option> --%>
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:37 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi,
> 
> Yes, but this option take the default language for the browser, in my case spanish, i need to web load by default in english instead spanish without change the browser locales.
> 
> I try your option but do not work for me.
> 
> Thanks for your help
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:03
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> You could try commenting out the below mentioned portion of the code in index. jsp file by putting <%--  and  --%>  at the beginning and at the end  as shown below   .  This will hide all the options in the drop down for selecting the language type . This works for me.
> 
> <%--                                          <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->
>                <option value="en"><fmt:message key="label.lang.english"/></option>
>                <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>                     --%>
> 
> 
> Thanks,
> Pranav
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:27 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi Mat
> 
> Do not work for me
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Matty Courtney [mailto:matty.courtney@citrix.com]
> Enviado el: jueves, 20 de septiembre de 2012 12:53
> Para: cloudstack-users@incubator.apache.org
> Asunto: Re: Force UI to be in English
> 
> I haven't had a chance to test this but you could also try changing 
> <option value="en"> to <option value="en" selected="selected"> in 
> index.jsp (as well as the changes suggested below)
> 
> 
> On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
> 
>> Hi,
>> 
>> Whit those changes, i haven´t got the combo box to display language 
>> and i can´t login
>> 
>> Regards
>> 
>> 
>> -----Mensaje original-----
>> De: Jessica Wang [mailto:Jessica.Wang@citrix.com] Enviado el: jueves,
>> 20 de septiembre de 2012 0:05
>> Para: Marcos Ortiz
>> CC: cloudstack-users@incubator.apache.org
>> Asunto: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Please try this:
>> (1) in "/ui/index.jsp":
>> replace
>> <div class="select-language">
>> with      
>> <div class="select-language" style="display:none">
>> 
>> (2) under "/client/WEB-INF/classes/resources/":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> (3) under your tomcat
>> "C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>> Sent: Tuesday, September 18, 2012 9:44 PM
>> To: Jessica Wang
>> Subject: Re: Force UI to be in English
>> 
>> I think i checked this option before and only removes the blank 
>> option but the web loads with the browser default, I need to select 
>> English option anyway.
>> 
>> Marcos Ortiz Fernández
>> IT Technical Engineer
>> Anadat Consulting
>> 
>> 
>> El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>> escribió:
>> 
>>> Marcos,
>>> 
>>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> -----Original Message-----
>>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>>> Sent: Tuesday, September 18, 2012 11:17 AM
>>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>>> Cc: cloudstack-dev@incubator.apache.org
>>> Subject: RE: Force UI to be in English
>>> 
>>> Marcos,
>>> 
>>> Cloudstack UI is using browser's default language as default.
>>> 
>>> To force UI to be in English instead of in browser's default 
>>> language, please just remove one line from your \ui\index.jsp
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> 
>>> 
>>> -----Original Message-----
>>> From: Chiradeep Vittal
>>> Sent: Monday, September 17, 2012 10:04 PM
>>> To: Jessica Wang
>>> Subject: FW: Force UI to be in English
>>> 
>>> 
>>> 
>>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>>> 
>>>> Hi all
>>>> 
>>>> I am from Spain and I need to change the default language to 
>>>> English instead to take the default from the browser.
>>>> 
>>>> I need this in order to avoid the bad translation to Spanish.
>>>> 
>>>> Thanks
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> 
> 
> 
> 





RE: Force UI to be in English

Posted by Marcos Ortiz <ma...@anadat.es>.
Hi,

Thanks for your post,

I have an advanced zone and i wish that users differents of admin can´t create networks for this domains, I want to admin users pre creates all the networks and users must use them.

Thanks!

Un saludo,


 Marcos Ortiz Fernández                  
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          


-----Mensaje original-----
De: Pranav Saxena [mailto:pranav.saxena@citrix.com] 
Enviado el: viernes, 21 de septiembre de 2012 10:38
Para: cloudstack-users@incubator.apache.org
CC: cloudstack-dev@incubator.apache.org; Marcos Ortiz
Asunto: RE: Force UI to be in English

Hi,

Yes you can certainly do that. Go to you network.js file under ui/scripts folder and search for the below code snippet  ( somewhere around line 225 )  and this check  isAdmin() as shown below and put the entire logic within brackets where the check condition is put.- 

preFilter: function(args) {
                if( isAdmin() ) {               //  ADD THIS CHECK -----------------------------------------------------------------------------------------------------------
                var basicZoneExists = true; //Modifying the logic behind displaying the tabs depending on the networktype
                $.ajax({
                  url: createURL("listZones"),
                  dataType: "json",
                  async: false,
                  success: function(json) {
                    if(json.listzonesresponse.zone != null && json.listzonesresponse.zone.length > 0) {
                      zoneObjs = json.listzonesresponse.zone;
                      $(zoneObjs).each(function() {
                        if(this.networktype == "Advanced") {
                          basicZoneExists = false; // For any occurence of an Advanced zone with any combination of basic zone , the add guest network tab will be displayed
                          return false; //break each loop
                        }
                      });
                    }
                  }   // -----------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks,
Pranav

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
Sent: Friday, September 21, 2012 1:42 PM
To: <cl...@incubator.apache.org>
Cc: cloudstack-users@incubator.apache.org
Subject: Re: Force UI to be in English

Hi again

It is possible to hide the add guest network for all users except for admin?

Thanks?

Marcos Ortiz Fernández
IT Technical Engineer
Anadat Consulting


El 20/09/2012, a las 16:54, "Pranav Saxena" <pr...@citrix.com> escribió:

> No problems , you are welcome !:) Feel free to address any UI queries to me !
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 7:58 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Perfect!!!!
> 
> Thanks a lot!!!
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:13
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> Then , I guess you could try out one thing - as shown in the patch 
> below
> 1) Comment out the first line ( shown below ) where it uses browser's 
> default language ( Spanish in your case)
> 2) Leave the second line uncommented ( English one )
> 3) Comment out the 3rd and the 4th line ( dealing with Japanese and chinese ) . 
> 
>  <%--              <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->  --%>
> 
>                <option value="en"><fmt:message 
> key="label.lang.english"/></option>
> 
>            <%--    <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option 
> value="zh_CN"><fmt:message key="label.lang.chinese"/></option> --%>
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:37 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi,
> 
> Yes, but this option take the default language for the browser, in my case spanish, i need to web load by default in english instead spanish without change the browser locales.
> 
> I try your option but do not work for me.
> 
> Thanks for your help
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:03
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> You could try commenting out the below mentioned portion of the code in index. jsp file by putting <%--  and  --%>  at the beginning and at the end  as shown below   .  This will hide all the options in the drop down for selecting the language type . This works for me.
> 
> <%--                                          <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->
>                <option value="en"><fmt:message key="label.lang.english"/></option>
>                <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>                     --%>
> 
> 
> Thanks,
> Pranav
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:27 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi Mat
> 
> Do not work for me
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Matty Courtney [mailto:matty.courtney@citrix.com]
> Enviado el: jueves, 20 de septiembre de 2012 12:53
> Para: cloudstack-users@incubator.apache.org
> Asunto: Re: Force UI to be in English
> 
> I haven't had a chance to test this but you could also try changing 
> <option value="en"> to <option value="en" selected="selected"> in 
> index.jsp (as well as the changes suggested below)
> 
> 
> On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
> 
>> Hi,
>> 
>> Whit those changes, i haven´t got the combo box to display language 
>> and i can´t login
>> 
>> Regards
>> 
>> 
>> -----Mensaje original-----
>> De: Jessica Wang [mailto:Jessica.Wang@citrix.com] Enviado el: jueves,
>> 20 de septiembre de 2012 0:05
>> Para: Marcos Ortiz
>> CC: cloudstack-users@incubator.apache.org
>> Asunto: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Please try this:
>> (1) in "/ui/index.jsp":
>> replace
>> <div class="select-language">
>> with      
>> <div class="select-language" style="display:none">
>> 
>> (2) under "/client/WEB-INF/classes/resources/":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> (3) under your tomcat
>> "C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>> Sent: Tuesday, September 18, 2012 9:44 PM
>> To: Jessica Wang
>> Subject: Re: Force UI to be in English
>> 
>> I think i checked this option before and only removes the blank 
>> option but the web loads with the browser default, I need to select 
>> English option anyway.
>> 
>> Marcos Ortiz Fernández
>> IT Technical Engineer
>> Anadat Consulting
>> 
>> 
>> El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>> escribió:
>> 
>>> Marcos,
>>> 
>>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> -----Original Message-----
>>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>>> Sent: Tuesday, September 18, 2012 11:17 AM
>>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>>> Cc: cloudstack-dev@incubator.apache.org
>>> Subject: RE: Force UI to be in English
>>> 
>>> Marcos,
>>> 
>>> Cloudstack UI is using browser's default language as default.
>>> 
>>> To force UI to be in English instead of in browser's default 
>>> language, please just remove one line from your \ui\index.jsp
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> 
>>> 
>>> -----Original Message-----
>>> From: Chiradeep Vittal
>>> Sent: Monday, September 17, 2012 10:04 PM
>>> To: Jessica Wang
>>> Subject: FW: Force UI to be in English
>>> 
>>> 
>>> 
>>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>>> 
>>>> Hi all
>>>> 
>>>> I am from Spain and I need to change the default language to 
>>>> English instead to take the default from the browser.
>>>> 
>>>> I need this in order to avoid the bad translation to Spanish.
>>>> 
>>>> Thanks
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> 
> 
> 
> 





RE: Force UI to be in English

Posted by Pranav Saxena <pr...@citrix.com>.
Also , I believe you are making changes directly in your tomcat folder , so you could find network.js in  apache-tomcat/webapps/client/scripts/network.js . Here you could add the check condition I mentioned in my previous mail and put the entire block within this check condition.

Check Condition ( This is the basic structure for the code changes )  -

preFilter:function(args) {   // around line 225 
 if(isAdmin() )  {    // Add this line of code 

   .......
......
   return !basicZoneExists ;
  }    // Add this closing bracket for the above condition
}

Thanks,
Pranav
-----Original Message-----
From: Pranav Saxena [mailto:pranav.saxena@citrix.com] 
Sent: Friday, September 21, 2012 2:08 PM
To: cloudstack-users@incubator.apache.org
Cc: cloudstack-dev@incubator.apache.org; marcos_ortiz@anadat.es
Subject: RE: Force UI to be in English

Hi,

Yes you can certainly do that. Go to you network.js file under ui/scripts folder and search for the below code snippet  ( somewhere around line 225 )  and this check  isAdmin() as shown below and put the entire logic within brackets where the check condition is put.- 

preFilter: function(args) {
                if( isAdmin() ) {               //  ADD THIS CHECK -----------------------------------------------------------------------------------------------------------
                var basicZoneExists = true; //Modifying the logic behind displaying the tabs depending on the networktype
                $.ajax({
                  url: createURL("listZones"),
                  dataType: "json",
                  async: false,
                  success: function(json) {
                    if(json.listzonesresponse.zone != null && json.listzonesresponse.zone.length > 0) {
                      zoneObjs = json.listzonesresponse.zone;
                      $(zoneObjs).each(function() {
                        if(this.networktype == "Advanced") {
                          basicZoneExists = false; // For any occurence of an Advanced zone with any combination of basic zone , the add guest network tab will be displayed
                          return false; //break each loop
                        }
                      });
                    }
                  }   // -----------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks,
Pranav

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es] 
Sent: Friday, September 21, 2012 1:42 PM
To: <cl...@incubator.apache.org>
Cc: cloudstack-users@incubator.apache.org
Subject: Re: Force UI to be in English

Hi again

It is possible to hide the add guest network for all users except for admin?

Thanks?

Marcos Ortiz Fernández
IT Technical Engineer
Anadat Consulting


El 20/09/2012, a las 16:54, "Pranav Saxena" <pr...@citrix.com> escribió:

> No problems , you are welcome !:) Feel free to address any UI queries to me !
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 7:58 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Perfect!!!!
> 
> Thanks a lot!!!
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:13
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> Then , I guess you could try out one thing - as shown in the patch 
> below
> 1) Comment out the first line ( shown below ) where it uses browser's 
> default language ( Spanish in your case)
> 2) Leave the second line uncommented ( English one )
> 3) Comment out the 3rd and the 4th line ( dealing with Japanese and chinese ) . 
> 
>  <%--              <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->  --%>
> 
>                <option value="en"><fmt:message 
> key="label.lang.english"/></option>
> 
>            <%--    <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option 
> value="zh_CN"><fmt:message key="label.lang.chinese"/></option> --%>
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:37 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi,
> 
> Yes, but this option take the default language for the browser, in my case spanish, i need to web load by default in english instead spanish without change the browser locales.
> 
> I try your option but do not work for me.
> 
> Thanks for your help
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:03
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> You could try commenting out the below mentioned portion of the code in index. jsp file by putting <%--  and  --%>  at the beginning and at the end  as shown below   .  This will hide all the options in the drop down for selecting the language type . This works for me.
> 
> <%--                                          <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->
>                <option value="en"><fmt:message key="label.lang.english"/></option>
>                <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>                     --%>
> 
> 
> Thanks,
> Pranav
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:27 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi Mat
> 
> Do not work for me
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Matty Courtney [mailto:matty.courtney@citrix.com]
> Enviado el: jueves, 20 de septiembre de 2012 12:53
> Para: cloudstack-users@incubator.apache.org
> Asunto: Re: Force UI to be in English
> 
> I haven't had a chance to test this but you could also try changing 
> <option value="en"> to <option value="en" selected="selected"> in 
> index.jsp (as well as the changes suggested below)
> 
> 
> On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
> 
>> Hi,
>> 
>> Whit those changes, i haven´t got the combo box to display language 
>> and i can´t login
>> 
>> Regards
>> 
>> 
>> -----Mensaje original-----
>> De: Jessica Wang [mailto:Jessica.Wang@citrix.com] Enviado el: jueves,
>> 20 de septiembre de 2012 0:05
>> Para: Marcos Ortiz
>> CC: cloudstack-users@incubator.apache.org
>> Asunto: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Please try this:
>> (1) in "/ui/index.jsp":
>> replace
>> <div class="select-language">
>> with      
>> <div class="select-language" style="display:none">
>> 
>> (2) under "/client/WEB-INF/classes/resources/":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> (3) under your tomcat
>> "C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>> Sent: Tuesday, September 18, 2012 9:44 PM
>> To: Jessica Wang
>> Subject: Re: Force UI to be in English
>> 
>> I think i checked this option before and only removes the blank 
>> option but the web loads with the browser default, I need to select 
>> English option anyway.
>> 
>> Marcos Ortiz Fernández
>> IT Technical Engineer
>> Anadat Consulting
>> 
>> 
>> El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>> escribió:
>> 
>>> Marcos,
>>> 
>>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> -----Original Message-----
>>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>>> Sent: Tuesday, September 18, 2012 11:17 AM
>>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>>> Cc: cloudstack-dev@incubator.apache.org
>>> Subject: RE: Force UI to be in English
>>> 
>>> Marcos,
>>> 
>>> Cloudstack UI is using browser's default language as default.
>>> 
>>> To force UI to be in English instead of in browser's default 
>>> language, please just remove one line from your \ui\index.jsp
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> 
>>> 
>>> -----Original Message-----
>>> From: Chiradeep Vittal
>>> Sent: Monday, September 17, 2012 10:04 PM
>>> To: Jessica Wang
>>> Subject: FW: Force UI to be in English
>>> 
>>> 
>>> 
>>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>>> 
>>>> Hi all
>>>> 
>>>> I am from Spain and I need to change the default language to 
>>>> English instead to take the default from the browser.
>>>> 
>>>> I need this in order to avoid the bad translation to Spanish.
>>>> 
>>>> Thanks
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> 
> 
> 
> 



RE: Force UI to be in English

Posted by Pranav Saxena <pr...@citrix.com>.
Also , I believe you are making changes directly in your tomcat folder , so you could find network.js in  apache-tomcat/webapps/client/scripts/network.js . Here you could add the check condition I mentioned in my previous mail and put the entire block within this check condition.

Check Condition ( This is the basic structure for the code changes )  -

preFilter:function(args) {   // around line 225 
 if(isAdmin() )  {    // Add this line of code 

   .......
......
   return !basicZoneExists ;
  }    // Add this closing bracket for the above condition
}

Thanks,
Pranav
-----Original Message-----
From: Pranav Saxena [mailto:pranav.saxena@citrix.com] 
Sent: Friday, September 21, 2012 2:08 PM
To: cloudstack-users@incubator.apache.org
Cc: cloudstack-dev@incubator.apache.org; marcos_ortiz@anadat.es
Subject: RE: Force UI to be in English

Hi,

Yes you can certainly do that. Go to you network.js file under ui/scripts folder and search for the below code snippet  ( somewhere around line 225 )  and this check  isAdmin() as shown below and put the entire logic within brackets where the check condition is put.- 

preFilter: function(args) {
                if( isAdmin() ) {               //  ADD THIS CHECK -----------------------------------------------------------------------------------------------------------
                var basicZoneExists = true; //Modifying the logic behind displaying the tabs depending on the networktype
                $.ajax({
                  url: createURL("listZones"),
                  dataType: "json",
                  async: false,
                  success: function(json) {
                    if(json.listzonesresponse.zone != null && json.listzonesresponse.zone.length > 0) {
                      zoneObjs = json.listzonesresponse.zone;
                      $(zoneObjs).each(function() {
                        if(this.networktype == "Advanced") {
                          basicZoneExists = false; // For any occurence of an Advanced zone with any combination of basic zone , the add guest network tab will be displayed
                          return false; //break each loop
                        }
                      });
                    }
                  }   // -----------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks,
Pranav

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es] 
Sent: Friday, September 21, 2012 1:42 PM
To: <cl...@incubator.apache.org>
Cc: cloudstack-users@incubator.apache.org
Subject: Re: Force UI to be in English

Hi again

It is possible to hide the add guest network for all users except for admin?

Thanks?

Marcos Ortiz Fernández
IT Technical Engineer
Anadat Consulting


El 20/09/2012, a las 16:54, "Pranav Saxena" <pr...@citrix.com> escribió:

> No problems , you are welcome !:) Feel free to address any UI queries to me !
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 7:58 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Perfect!!!!
> 
> Thanks a lot!!!
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:13
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> Then , I guess you could try out one thing - as shown in the patch 
> below
> 1) Comment out the first line ( shown below ) where it uses browser's 
> default language ( Spanish in your case)
> 2) Leave the second line uncommented ( English one )
> 3) Comment out the 3rd and the 4th line ( dealing with Japanese and chinese ) . 
> 
>  <%--              <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->  --%>
> 
>                <option value="en"><fmt:message 
> key="label.lang.english"/></option>
> 
>            <%--    <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option 
> value="zh_CN"><fmt:message key="label.lang.chinese"/></option> --%>
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:37 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi,
> 
> Yes, but this option take the default language for the browser, in my case spanish, i need to web load by default in english instead spanish without change the browser locales.
> 
> I try your option but do not work for me.
> 
> Thanks for your help
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:03
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> You could try commenting out the below mentioned portion of the code in index. jsp file by putting <%--  and  --%>  at the beginning and at the end  as shown below   .  This will hide all the options in the drop down for selecting the language type . This works for me.
> 
> <%--                                          <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->
>                <option value="en"><fmt:message key="label.lang.english"/></option>
>                <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>                     --%>
> 
> 
> Thanks,
> Pranav
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:27 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi Mat
> 
> Do not work for me
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Matty Courtney [mailto:matty.courtney@citrix.com]
> Enviado el: jueves, 20 de septiembre de 2012 12:53
> Para: cloudstack-users@incubator.apache.org
> Asunto: Re: Force UI to be in English
> 
> I haven't had a chance to test this but you could also try changing 
> <option value="en"> to <option value="en" selected="selected"> in 
> index.jsp (as well as the changes suggested below)
> 
> 
> On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
> 
>> Hi,
>> 
>> Whit those changes, i haven´t got the combo box to display language 
>> and i can´t login
>> 
>> Regards
>> 
>> 
>> -----Mensaje original-----
>> De: Jessica Wang [mailto:Jessica.Wang@citrix.com] Enviado el: jueves,
>> 20 de septiembre de 2012 0:05
>> Para: Marcos Ortiz
>> CC: cloudstack-users@incubator.apache.org
>> Asunto: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Please try this:
>> (1) in "/ui/index.jsp":
>> replace
>> <div class="select-language">
>> with      
>> <div class="select-language" style="display:none">
>> 
>> (2) under "/client/WEB-INF/classes/resources/":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> (3) under your tomcat
>> "C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>> Sent: Tuesday, September 18, 2012 9:44 PM
>> To: Jessica Wang
>> Subject: Re: Force UI to be in English
>> 
>> I think i checked this option before and only removes the blank 
>> option but the web loads with the browser default, I need to select 
>> English option anyway.
>> 
>> Marcos Ortiz Fernández
>> IT Technical Engineer
>> Anadat Consulting
>> 
>> 
>> El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>> escribió:
>> 
>>> Marcos,
>>> 
>>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> -----Original Message-----
>>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>>> Sent: Tuesday, September 18, 2012 11:17 AM
>>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>>> Cc: cloudstack-dev@incubator.apache.org
>>> Subject: RE: Force UI to be in English
>>> 
>>> Marcos,
>>> 
>>> Cloudstack UI is using browser's default language as default.
>>> 
>>> To force UI to be in English instead of in browser's default 
>>> language, please just remove one line from your \ui\index.jsp
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> 
>>> 
>>> -----Original Message-----
>>> From: Chiradeep Vittal
>>> Sent: Monday, September 17, 2012 10:04 PM
>>> To: Jessica Wang
>>> Subject: FW: Force UI to be in English
>>> 
>>> 
>>> 
>>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>>> 
>>>> Hi all
>>>> 
>>>> I am from Spain and I need to change the default language to 
>>>> English instead to take the default from the browser.
>>>> 
>>>> I need this in order to avoid the bad translation to Spanish.
>>>> 
>>>> Thanks
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> 
> 
> 
> 



RE: Force UI to be in English

Posted by Pranav Saxena <pr...@citrix.com>.
Hi,

Yes you can certainly do that. Go to you network.js file under ui/scripts folder and search for the below code snippet  ( somewhere around line 225 )  and this check  isAdmin() as shown below and put the entire logic within brackets where the check condition is put.- 

preFilter: function(args) {
                if( isAdmin() ) {               //  ADD THIS CHECK -----------------------------------------------------------------------------------------------------------
                var basicZoneExists = true; //Modifying the logic behind displaying the tabs depending on the networktype
                $.ajax({
                  url: createURL("listZones"),
                  dataType: "json",
                  async: false,
                  success: function(json) {
                    if(json.listzonesresponse.zone != null && json.listzonesresponse.zone.length > 0) {
                      zoneObjs = json.listzonesresponse.zone;
                      $(zoneObjs).each(function() {
                        if(this.networktype == "Advanced") {
                          basicZoneExists = false; // For any occurence of an Advanced zone with any combination of basic zone , the add guest network tab will be displayed
                          return false; //break each loop
                        }
                      });
                    }
                  }   // -----------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks,
Pranav

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es] 
Sent: Friday, September 21, 2012 1:42 PM
To: <cl...@incubator.apache.org>
Cc: cloudstack-users@incubator.apache.org
Subject: Re: Force UI to be in English

Hi again

It is possible to hide the add guest network for all users except for admin?

Thanks?

Marcos Ortiz Fernández
IT Technical Engineer
Anadat Consulting


El 20/09/2012, a las 16:54, "Pranav Saxena" <pr...@citrix.com> escribió:

> No problems , you are welcome !:) Feel free to address any UI queries to me !
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 7:58 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Perfect!!!!
> 
> Thanks a lot!!!
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:13
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> Then , I guess you could try out one thing - as shown in the patch 
> below
> 1) Comment out the first line ( shown below ) where it uses browser's 
> default language ( Spanish in your case)
> 2) Leave the second line uncommented ( English one )
> 3) Comment out the 3rd and the 4th line ( dealing with Japanese and chinese ) . 
> 
>  <%--              <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->  --%>
> 
>                <option value="en"><fmt:message 
> key="label.lang.english"/></option>
> 
>            <%--    <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option 
> value="zh_CN"><fmt:message key="label.lang.chinese"/></option> --%>
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:37 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi,
> 
> Yes, but this option take the default language for the browser, in my case spanish, i need to web load by default in english instead spanish without change the browser locales.
> 
> I try your option but do not work for me.
> 
> Thanks for your help
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:03
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> You could try commenting out the below mentioned portion of the code in index. jsp file by putting <%--  and  --%>  at the beginning and at the end  as shown below   .  This will hide all the options in the drop down for selecting the language type . This works for me.
> 
> <%--                                          <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->
>                <option value="en"><fmt:message key="label.lang.english"/></option>
>                <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>                     --%>
> 
> 
> Thanks,
> Pranav
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:27 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi Mat
> 
> Do not work for me
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Matty Courtney [mailto:matty.courtney@citrix.com]
> Enviado el: jueves, 20 de septiembre de 2012 12:53
> Para: cloudstack-users@incubator.apache.org
> Asunto: Re: Force UI to be in English
> 
> I haven't had a chance to test this but you could also try changing 
> <option value="en"> to <option value="en" selected="selected"> in 
> index.jsp (as well as the changes suggested below)
> 
> 
> On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
> 
>> Hi,
>> 
>> Whit those changes, i haven´t got the combo box to display language 
>> and i can´t login
>> 
>> Regards
>> 
>> 
>> -----Mensaje original-----
>> De: Jessica Wang [mailto:Jessica.Wang@citrix.com] Enviado el: jueves,
>> 20 de septiembre de 2012 0:05
>> Para: Marcos Ortiz
>> CC: cloudstack-users@incubator.apache.org
>> Asunto: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Please try this:
>> (1) in "/ui/index.jsp":
>> replace
>> <div class="select-language">
>> with      
>> <div class="select-language" style="display:none">
>> 
>> (2) under "/client/WEB-INF/classes/resources/":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> (3) under your tomcat
>> "C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>> Sent: Tuesday, September 18, 2012 9:44 PM
>> To: Jessica Wang
>> Subject: Re: Force UI to be in English
>> 
>> I think i checked this option before and only removes the blank 
>> option but the web loads with the browser default, I need to select 
>> English option anyway.
>> 
>> Marcos Ortiz Fernández
>> IT Technical Engineer
>> Anadat Consulting
>> 
>> 
>> El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>> escribió:
>> 
>>> Marcos,
>>> 
>>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> -----Original Message-----
>>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>>> Sent: Tuesday, September 18, 2012 11:17 AM
>>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>>> Cc: cloudstack-dev@incubator.apache.org
>>> Subject: RE: Force UI to be in English
>>> 
>>> Marcos,
>>> 
>>> Cloudstack UI is using browser's default language as default.
>>> 
>>> To force UI to be in English instead of in browser's default 
>>> language, please just remove one line from your \ui\index.jsp
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> 
>>> 
>>> -----Original Message-----
>>> From: Chiradeep Vittal
>>> Sent: Monday, September 17, 2012 10:04 PM
>>> To: Jessica Wang
>>> Subject: FW: Force UI to be in English
>>> 
>>> 
>>> 
>>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>>> 
>>>> Hi all
>>>> 
>>>> I am from Spain and I need to change the default language to 
>>>> English instead to take the default from the browser.
>>>> 
>>>> I need this in order to avoid the bad translation to Spanish.
>>>> 
>>>> Thanks
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> 
> 
> 
> 



RE: Force UI to be in English

Posted by Pranav Saxena <pr...@citrix.com>.
Hi,

Yes you can certainly do that. Go to you network.js file under ui/scripts folder and search for the below code snippet  ( somewhere around line 225 )  and this check  isAdmin() as shown below and put the entire logic within brackets where the check condition is put.- 

preFilter: function(args) {
                if( isAdmin() ) {               //  ADD THIS CHECK -----------------------------------------------------------------------------------------------------------
                var basicZoneExists = true; //Modifying the logic behind displaying the tabs depending on the networktype
                $.ajax({
                  url: createURL("listZones"),
                  dataType: "json",
                  async: false,
                  success: function(json) {
                    if(json.listzonesresponse.zone != null && json.listzonesresponse.zone.length > 0) {
                      zoneObjs = json.listzonesresponse.zone;
                      $(zoneObjs).each(function() {
                        if(this.networktype == "Advanced") {
                          basicZoneExists = false; // For any occurence of an Advanced zone with any combination of basic zone , the add guest network tab will be displayed
                          return false; //break each loop
                        }
                      });
                    }
                  }   // -----------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks,
Pranav

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es] 
Sent: Friday, September 21, 2012 1:42 PM
To: <cl...@incubator.apache.org>
Cc: cloudstack-users@incubator.apache.org
Subject: Re: Force UI to be in English

Hi again

It is possible to hide the add guest network for all users except for admin?

Thanks?

Marcos Ortiz Fernández
IT Technical Engineer
Anadat Consulting


El 20/09/2012, a las 16:54, "Pranav Saxena" <pr...@citrix.com> escribió:

> No problems , you are welcome !:) Feel free to address any UI queries to me !
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 7:58 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Perfect!!!!
> 
> Thanks a lot!!!
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:13
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> Then , I guess you could try out one thing - as shown in the patch 
> below
> 1) Comment out the first line ( shown below ) where it uses browser's 
> default language ( Spanish in your case)
> 2) Leave the second line uncommented ( English one )
> 3) Comment out the 3rd and the 4th line ( dealing with Japanese and chinese ) . 
> 
>  <%--              <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->  --%>
> 
>                <option value="en"><fmt:message 
> key="label.lang.english"/></option>
> 
>            <%--    <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option 
> value="zh_CN"><fmt:message key="label.lang.chinese"/></option> --%>
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:37 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi,
> 
> Yes, but this option take the default language for the browser, in my case spanish, i need to web load by default in english instead spanish without change the browser locales.
> 
> I try your option but do not work for me.
> 
> Thanks for your help
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: 
> jueves, 20 de septiembre de 2012 14:03
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> You could try commenting out the below mentioned portion of the code in index. jsp file by putting <%--  and  --%>  at the beginning and at the end  as shown below   .  This will hide all the options in the drop down for selecting the language type . This works for me.
> 
> <%--                                          <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->
>                <option value="en"><fmt:message key="label.lang.english"/></option>
>                <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>                     --%>
> 
> 
> Thanks,
> Pranav
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:27 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi Mat
> 
> Do not work for me
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Matty Courtney [mailto:matty.courtney@citrix.com]
> Enviado el: jueves, 20 de septiembre de 2012 12:53
> Para: cloudstack-users@incubator.apache.org
> Asunto: Re: Force UI to be in English
> 
> I haven't had a chance to test this but you could also try changing 
> <option value="en"> to <option value="en" selected="selected"> in 
> index.jsp (as well as the changes suggested below)
> 
> 
> On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
> 
>> Hi,
>> 
>> Whit those changes, i haven´t got the combo box to display language 
>> and i can´t login
>> 
>> Regards
>> 
>> 
>> -----Mensaje original-----
>> De: Jessica Wang [mailto:Jessica.Wang@citrix.com] Enviado el: jueves,
>> 20 de septiembre de 2012 0:05
>> Para: Marcos Ortiz
>> CC: cloudstack-users@incubator.apache.org
>> Asunto: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Please try this:
>> (1) in "/ui/index.jsp":
>> replace
>> <div class="select-language">
>> with      
>> <div class="select-language" style="display:none">
>> 
>> (2) under "/client/WEB-INF/classes/resources/":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> (3) under your tomcat
>> "C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>> Sent: Tuesday, September 18, 2012 9:44 PM
>> To: Jessica Wang
>> Subject: Re: Force UI to be in English
>> 
>> I think i checked this option before and only removes the blank 
>> option but the web loads with the browser default, I need to select 
>> English option anyway.
>> 
>> Marcos Ortiz Fernández
>> IT Technical Engineer
>> Anadat Consulting
>> 
>> 
>> El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>> escribió:
>> 
>>> Marcos,
>>> 
>>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> -----Original Message-----
>>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>>> Sent: Tuesday, September 18, 2012 11:17 AM
>>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>>> Cc: cloudstack-dev@incubator.apache.org
>>> Subject: RE: Force UI to be in English
>>> 
>>> Marcos,
>>> 
>>> Cloudstack UI is using browser's default language as default.
>>> 
>>> To force UI to be in English instead of in browser's default 
>>> language, please just remove one line from your \ui\index.jsp
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> ====================================================================
>>> = = ============================================================
>>> 
>>> Jessica
>>> 
>>> 
>>> 
>>> -----Original Message-----
>>> From: Chiradeep Vittal
>>> Sent: Monday, September 17, 2012 10:04 PM
>>> To: Jessica Wang
>>> Subject: FW: Force UI to be in English
>>> 
>>> 
>>> 
>>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>>> 
>>>> Hi all
>>>> 
>>>> I am from Spain and I need to change the default language to 
>>>> English instead to take the default from the browser.
>>>> 
>>>> I need this in order to avoid the bad translation to Spanish.
>>>> 
>>>> Thanks
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> 
> 
> 
> 



Re: Force UI to be in English

Posted by Marcos Ortiz <ma...@anadat.es>.
Hi again

It is possible to hide the add guest network for all users except for admin?

Thanks?

Marcos Ortiz Fernández
IT Technical Engineer  
Anadat Consulting


El 20/09/2012, a las 16:54, "Pranav Saxena" <pr...@citrix.com> escribió:

> No problems , you are welcome !:) Feel free to address any UI queries to me !
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es] 
> Sent: Thursday, September 20, 2012 7:58 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Perfect!!!!
> 
> Thanks a lot!!!
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer  
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: jueves, 20 de septiembre de 2012 14:13
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> Then , I guess you could try out one thing - as shown in the patch below
> 1) Comment out the first line ( shown below ) where it uses browser's default language ( Spanish in your case)
> 2) Leave the second line uncommented ( English one )
> 3) Comment out the 3rd and the 4th line ( dealing with Japanese and chinese ) . 
> 
>  <%--              <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->  --%>
> 
>                <option value="en"><fmt:message key="label.lang.english"/></option>
> 
>            <%--    <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option> --%>
> 
> Thanks,
> Pranav
> 
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:37 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi,
> 
> Yes, but this option take the default language for the browser, in my case spanish, i need to web load by default in english instead spanish without change the browser locales.
> 
> I try your option but do not work for me.
> 
> Thanks for your help
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer  
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: jueves, 20 de septiembre de 2012 14:03
> Para: cloudstack-users@incubator.apache.org
> Asunto: RE: Force UI to be in English
> 
> You could try commenting out the below mentioned portion of the code in index. jsp file by putting <%--  and  --%>  at the beginning and at the end  as shown below   .  This will hide all the options in the drop down for selecting the language type . This works for me.
> 
> <%--                                          <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->
>                <option value="en"><fmt:message key="label.lang.english"/></option>
>                <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>                     --%>
> 
> 
> Thanks,
> Pranav
> -----Original Message-----
> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
> Sent: Thursday, September 20, 2012 5:27 PM
> To: cloudstack-users@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Hi Mat
> 
> Do not work for me
> 
> Un saludo,
> 
> 
>  Marcos Ortiz Fernández
>  IT Technical Engineer  
> 
>  Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
>  Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
>  28521 - Madrid                                          
> 
> 
> 
> -----Mensaje original-----
> De: Matty Courtney [mailto:matty.courtney@citrix.com]
> Enviado el: jueves, 20 de septiembre de 2012 12:53
> Para: cloudstack-users@incubator.apache.org
> Asunto: Re: Force UI to be in English
> 
> I haven't had a chance to test this but you could also try changing <option value="en"> to <option value="en" selected="selected"> in index.jsp (as well as the changes suggested below)
> 
> 
> On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
> 
>> Hi,
>> 
>> Whit those changes, i haven´t got the combo box to display language and 
>> i can´t login
>> 
>> Regards
>> 
>> 
>> -----Mensaje original-----
>> De: Jessica Wang [mailto:Jessica.Wang@citrix.com] Enviado el: jueves,
>> 20 de septiembre de 2012 0:05
>> Para: Marcos Ortiz
>> CC: cloudstack-users@incubator.apache.org
>> Asunto: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Please try this:
>> (1) in "/ui/index.jsp":
>> replace
>> <div class="select-language">
>> with      
>> <div class="select-language" style="display:none">
>> 
>> (2) under "/client/WEB-INF/classes/resources/":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> (3) under your tomcat
>> "C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>> keep "messages.properties", but delete everything else 
>> (e.g."messages_es.properties", "messages_ja.properties",
>> "messages_zh_CN.properties")
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>> Sent: Tuesday, September 18, 2012 9:44 PM
>> To: Jessica Wang
>> Subject: Re: Force UI to be in English
>> 
>> I think i checked this option before and only removes the blank option 
>> but the web loads with the browser default, I need to select English 
>> option anyway.
>> 
>> Marcos Ortiz Fernández
>> IT Technical Engineer
>> Anadat Consulting
>> 
>> 
>> El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>> escribió:
>> 
>>> Marcos,
>>> 
>>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>>> 
>>> =====================================================================
>>> = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> =====================================================================
>>> = ============================================================
>>> 
>>> Jessica
>>> 
>>> -----Original Message-----
>>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>>> Sent: Tuesday, September 18, 2012 11:17 AM
>>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>>> Cc: cloudstack-dev@incubator.apache.org
>>> Subject: RE: Force UI to be in English
>>> 
>>> Marcos,
>>> 
>>> Cloudstack UI is using browser's default language as default.
>>> 
>>> To force UI to be in English instead of in browser's default 
>>> language, please just remove one line from your \ui\index.jsp
>>> 
>>> =====================================================================
>>> = ============================================================
>>> 
>>> <div class="select-language">
>>>   <select name="language">
>>>       <option value=""></option>  //************ please remove this 
>>> line ************
>>>       <option value="en"><fmt:message 
>>> key="label.lang.english"/></option>
>>>       <option value="ja"><fmt:message 
>>> key="label.lang.japanese"/></option>
>>>       <option value="zh_CN"><fmt:message 
>>> key="label.lang.chinese"/></option>
>>>   </select>
>>> </div>
>>> 
>>> =====================================================================
>>> = ============================================================
>>> 
>>> Jessica
>>> 
>>> 
>>> 
>>> -----Original Message-----
>>> From: Chiradeep Vittal
>>> Sent: Monday, September 17, 2012 10:04 PM
>>> To: Jessica Wang
>>> Subject: FW: Force UI to be in English
>>> 
>>> 
>>> 
>>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>>> 
>>>> Hi all
>>>> 
>>>> I am from Spain and I need to change the default language to English 
>>>> instead to take the default from the browser.
>>>> 
>>>> I need this in order to avoid the bad translation to Spanish.
>>>> 
>>>> Thanks
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> 
> 
> 
> 



RE: Force UI to be in English

Posted by Pranav Saxena <pr...@citrix.com>.
No problems , you are welcome !:) Feel free to address any UI queries to me !

Thanks,
Pranav

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es] 
Sent: Thursday, September 20, 2012 7:58 PM
To: cloudstack-users@incubator.apache.org
Subject: RE: Force UI to be in English

Perfect!!!!

Thanks a lot!!!

Un saludo,


 Marcos Ortiz Fernández
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          



-----Mensaje original-----
De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: jueves, 20 de septiembre de 2012 14:13
Para: cloudstack-users@incubator.apache.org
Asunto: RE: Force UI to be in English

Then , I guess you could try out one thing - as shown in the patch below
1) Comment out the first line ( shown below ) where it uses browser's default language ( Spanish in your case)
2) Leave the second line uncommented ( English one )
3) Comment out the 3rd and the 4th line ( dealing with Japanese and chinese ) . 

  <%--              <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->  --%>

                <option value="en"><fmt:message key="label.lang.english"/></option>

            <%--    <option value="ja"><fmt:message key="label.lang.japanese"/></option>
                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option> --%>

Thanks,
Pranav

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
Sent: Thursday, September 20, 2012 5:37 PM
To: cloudstack-users@incubator.apache.org
Subject: RE: Force UI to be in English

Hi,

Yes, but this option take the default language for the browser, in my case spanish, i need to web load by default in english instead spanish without change the browser locales.

I try your option but do not work for me.

Thanks for your help

Un saludo,


 Marcos Ortiz Fernández
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          



-----Mensaje original-----
De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: jueves, 20 de septiembre de 2012 14:03
Para: cloudstack-users@incubator.apache.org
Asunto: RE: Force UI to be in English

You could try commenting out the below mentioned portion of the code in index. jsp file by putting <%--  and  --%>  at the beginning and at the end  as shown below   .  This will hide all the options in the drop down for selecting the language type . This works for me.

<%--                                          <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->
                <option value="en"><fmt:message key="label.lang.english"/></option>
                <option value="ja"><fmt:message key="label.lang.japanese"/></option>
                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>                     --%>


Thanks,
Pranav
-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
Sent: Thursday, September 20, 2012 5:27 PM
To: cloudstack-users@incubator.apache.org
Subject: RE: Force UI to be in English

Hi Mat

Do not work for me

Un saludo,


 Marcos Ortiz Fernández
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          



-----Mensaje original-----
De: Matty Courtney [mailto:matty.courtney@citrix.com]
Enviado el: jueves, 20 de septiembre de 2012 12:53
Para: cloudstack-users@incubator.apache.org
Asunto: Re: Force UI to be in English

I haven't had a chance to test this but you could also try changing <option value="en"> to <option value="en" selected="selected"> in index.jsp (as well as the changes suggested below)


On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:

>Hi,
>
>Whit those changes, i haven´t got the combo box to display language and 
>i can´t login
>
>Regards
>
>
>-----Mensaje original-----
>De: Jessica Wang [mailto:Jessica.Wang@citrix.com] Enviado el: jueves,
>20 de septiembre de 2012 0:05
>Para: Marcos Ortiz
>CC: cloudstack-users@incubator.apache.org
>Asunto: RE: Force UI to be in English
>
>Marcos,
>
>Please try this:
>(1) in "/ui/index.jsp":
>replace
><div class="select-language">
>with      
><div class="select-language" style="display:none">
>
>(2) under "/client/WEB-INF/classes/resources/":
>keep "messages.properties", but delete everything else 
>(e.g."messages_es.properties", "messages_ja.properties",
>"messages_zh_CN.properties")
>
>(3) under your tomcat
>"C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>keep "messages.properties", but delete everything else 
>(e.g."messages_es.properties", "messages_ja.properties",
>"messages_zh_CN.properties")
>
>Jessica
>
>-----Original Message-----
>From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>Sent: Tuesday, September 18, 2012 9:44 PM
>To: Jessica Wang
>Subject: Re: Force UI to be in English
>
>I think i checked this option before and only removes the blank option 
>but the web loads with the browser default, I need to select English 
>option anyway.
>
>Marcos Ortiz Fernández
>IT Technical Engineer
>Anadat Consulting
>
>
>El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>escribió:
>
>> Marcos,
>> 
>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>> 
>> =====================================================================
>> = ============================================================
>> 
>> <div class="select-language">
>>    <select name="language">
>>        <option value=""></option>  //************ please remove this 
>>line ************
>>        <option value="en"><fmt:message 
>>key="label.lang.english"/></option>
>>        <option value="ja"><fmt:message 
>>key="label.lang.japanese"/></option>
>>        <option value="zh_CN"><fmt:message 
>>key="label.lang.chinese"/></option>
>>    </select>
>> </div>
>> 
>> =====================================================================
>> = ============================================================
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>> Sent: Tuesday, September 18, 2012 11:17 AM
>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>> Cc: cloudstack-dev@incubator.apache.org
>> Subject: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Cloudstack UI is using browser's default language as default.
>> 
>> To force UI to be in English instead of in browser's default 
>> language, please just remove one line from your \ui\index.jsp
>> 
>> =====================================================================
>> = ============================================================
>> 
>> <div class="select-language">
>>    <select name="language">
>>        <option value=""></option>  //************ please remove this 
>>line ************
>>        <option value="en"><fmt:message 
>>key="label.lang.english"/></option>
>>        <option value="ja"><fmt:message 
>>key="label.lang.japanese"/></option>
>>        <option value="zh_CN"><fmt:message 
>>key="label.lang.chinese"/></option>
>>    </select>
>> </div>
>> 
>> =====================================================================
>> = ============================================================
>> 
>> Jessica
>> 
>> 
>> 
>> -----Original Message-----
>> From: Chiradeep Vittal
>> Sent: Monday, September 17, 2012 10:04 PM
>> To: Jessica Wang
>> Subject: FW: Force UI to be in English
>> 
>> 
>> 
>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>> 
>>> Hi all
>>> 
>>> I am from Spain and I need to change the default language to English 
>>> instead to take the default from the browser.
>>> 
>>> I need this in order to avoid the bad translation to Spanish.
>>> 
>>> Thanks
>>> 
>>> 
>>> 
>> 
>
>
>
>








RE: Force UI to be in English

Posted by Marcos Ortiz <ma...@anadat.es>.
Perfect!!!!

Thanks a lot!!!

Un saludo,


 Marcos Ortiz Fernández                  
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          



-----Mensaje original-----
De: Pranav Saxena [mailto:pranav.saxena@citrix.com] 
Enviado el: jueves, 20 de septiembre de 2012 14:13
Para: cloudstack-users@incubator.apache.org
Asunto: RE: Force UI to be in English

Then , I guess you could try out one thing - as shown in the patch below
1) Comment out the first line ( shown below ) where it uses browser's default language ( Spanish in your case)
2) Leave the second line uncommented ( English one )
3) Comment out the 3rd and the 4th line ( dealing with Japanese and chinese ) . 

  <%--              <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->  --%>

                <option value="en"><fmt:message key="label.lang.english"/></option>

            <%--    <option value="ja"><fmt:message key="label.lang.japanese"/></option>
                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option> --%>

Thanks,
Pranav

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
Sent: Thursday, September 20, 2012 5:37 PM
To: cloudstack-users@incubator.apache.org
Subject: RE: Force UI to be in English

Hi,

Yes, but this option take the default language for the browser, in my case spanish, i need to web load by default in english instead spanish without change the browser locales.

I try your option but do not work for me.

Thanks for your help

Un saludo,


 Marcos Ortiz Fernández
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          



-----Mensaje original-----
De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: jueves, 20 de septiembre de 2012 14:03
Para: cloudstack-users@incubator.apache.org
Asunto: RE: Force UI to be in English

You could try commenting out the below mentioned portion of the code in index. jsp file by putting <%--  and  --%>  at the beginning and at the end  as shown below   .  This will hide all the options in the drop down for selecting the language type . This works for me.

<%--                                          <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->
                <option value="en"><fmt:message key="label.lang.english"/></option>
                <option value="ja"><fmt:message key="label.lang.japanese"/></option>
                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>                     --%>


Thanks,
Pranav
-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
Sent: Thursday, September 20, 2012 5:27 PM
To: cloudstack-users@incubator.apache.org
Subject: RE: Force UI to be in English

Hi Mat

Do not work for me

Un saludo,


 Marcos Ortiz Fernández
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          



-----Mensaje original-----
De: Matty Courtney [mailto:matty.courtney@citrix.com]
Enviado el: jueves, 20 de septiembre de 2012 12:53
Para: cloudstack-users@incubator.apache.org
Asunto: Re: Force UI to be in English

I haven't had a chance to test this but you could also try changing <option value="en"> to <option value="en" selected="selected"> in index.jsp (as well as the changes suggested below)


On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:

>Hi,
>
>Whit those changes, i haven´t got the combo box to display language and 
>i can´t login
>
>Regards
>
>
>-----Mensaje original-----
>De: Jessica Wang [mailto:Jessica.Wang@citrix.com] Enviado el: jueves,
>20 de septiembre de 2012 0:05
>Para: Marcos Ortiz
>CC: cloudstack-users@incubator.apache.org
>Asunto: RE: Force UI to be in English
>
>Marcos,
>
>Please try this:
>(1) in "/ui/index.jsp":
>replace
><div class="select-language">
>with      
><div class="select-language" style="display:none">
>
>(2) under "/client/WEB-INF/classes/resources/":
>keep "messages.properties", but delete everything else 
>(e.g."messages_es.properties", "messages_ja.properties",
>"messages_zh_CN.properties")
>
>(3) under your tomcat
>"C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>keep "messages.properties", but delete everything else 
>(e.g."messages_es.properties", "messages_ja.properties",
>"messages_zh_CN.properties")
>
>Jessica
>
>-----Original Message-----
>From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>Sent: Tuesday, September 18, 2012 9:44 PM
>To: Jessica Wang
>Subject: Re: Force UI to be in English
>
>I think i checked this option before and only removes the blank option 
>but the web loads with the browser default, I need to select English 
>option anyway.
>
>Marcos Ortiz Fernández
>IT Technical Engineer
>Anadat Consulting
>
>
>El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>escribió:
>
>> Marcos,
>> 
>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>> 
>> =====================================================================
>> = ============================================================
>> 
>> <div class="select-language">
>>    <select name="language">
>>        <option value=""></option>  //************ please remove this 
>>line ************
>>        <option value="en"><fmt:message 
>>key="label.lang.english"/></option>
>>        <option value="ja"><fmt:message 
>>key="label.lang.japanese"/></option>
>>        <option value="zh_CN"><fmt:message 
>>key="label.lang.chinese"/></option>
>>    </select>
>> </div>
>> 
>> =====================================================================
>> = ============================================================
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>> Sent: Tuesday, September 18, 2012 11:17 AM
>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>> Cc: cloudstack-dev@incubator.apache.org
>> Subject: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Cloudstack UI is using browser's default language as default.
>> 
>> To force UI to be in English instead of in browser's default 
>> language, please just remove one line from your \ui\index.jsp
>> 
>> =====================================================================
>> = ============================================================
>> 
>> <div class="select-language">
>>    <select name="language">
>>        <option value=""></option>  //************ please remove this 
>>line ************
>>        <option value="en"><fmt:message 
>>key="label.lang.english"/></option>
>>        <option value="ja"><fmt:message 
>>key="label.lang.japanese"/></option>
>>        <option value="zh_CN"><fmt:message 
>>key="label.lang.chinese"/></option>
>>    </select>
>> </div>
>> 
>> =====================================================================
>> = ============================================================
>> 
>> Jessica
>> 
>> 
>> 
>> -----Original Message-----
>> From: Chiradeep Vittal
>> Sent: Monday, September 17, 2012 10:04 PM
>> To: Jessica Wang
>> Subject: FW: Force UI to be in English
>> 
>> 
>> 
>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>> 
>>> Hi all
>>> 
>>> I am from Spain and I need to change the default language to English 
>>> instead to take the default from the browser.
>>> 
>>> I need this in order to avoid the bad translation to Spanish.
>>> 
>>> Thanks
>>> 
>>> 
>>> 
>> 
>
>
>
>








RE: Force UI to be in English

Posted by Pranav Saxena <pr...@citrix.com>.
Then , I guess you could try out one thing - as shown in the patch below 
1) Comment out the first line ( shown below ) where it uses browser's default language ( Spanish in your case) 
2) Leave the second line uncommented ( English one ) 
3) Comment out the 3rd and the 4th line ( dealing with Japanese and chinese ) . 

  <%--              <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->  --%>

                <option value="en"><fmt:message key="label.lang.english"/></option>

            <%--    <option value="ja"><fmt:message key="label.lang.japanese"/></option>
                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option> --%>

Thanks,
Pranav

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es] 
Sent: Thursday, September 20, 2012 5:37 PM
To: cloudstack-users@incubator.apache.org
Subject: RE: Force UI to be in English

Hi,

Yes, but this option take the default language for the browser, in my case spanish, i need to web load by default in english instead spanish without change the browser locales.

I try your option but do not work for me.

Thanks for your help

Un saludo,


 Marcos Ortiz Fernández
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          



-----Mensaje original-----
De: Pranav Saxena [mailto:pranav.saxena@citrix.com] Enviado el: jueves, 20 de septiembre de 2012 14:03
Para: cloudstack-users@incubator.apache.org
Asunto: RE: Force UI to be in English

You could try commenting out the below mentioned portion of the code in index. jsp file by putting <%--  and  --%>  at the beginning and at the end  as shown below   .  This will hide all the options in the drop down for selecting the language type . This works for me.

<%--                                          <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->
                <option value="en"><fmt:message key="label.lang.english"/></option>
                <option value="ja"><fmt:message key="label.lang.japanese"/></option>
                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>                     --%>


Thanks,
Pranav
-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
Sent: Thursday, September 20, 2012 5:27 PM
To: cloudstack-users@incubator.apache.org
Subject: RE: Force UI to be in English

Hi Mat

Do not work for me

Un saludo,


 Marcos Ortiz Fernández
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          



-----Mensaje original-----
De: Matty Courtney [mailto:matty.courtney@citrix.com]
Enviado el: jueves, 20 de septiembre de 2012 12:53
Para: cloudstack-users@incubator.apache.org
Asunto: Re: Force UI to be in English

I haven't had a chance to test this but you could also try changing <option value="en"> to <option value="en" selected="selected"> in index.jsp (as well as the changes suggested below)


On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:

>Hi,
>
>Whit those changes, i haven´t got the combo box to display language and 
>i can´t login
>
>Regards
>
>
>-----Mensaje original-----
>De: Jessica Wang [mailto:Jessica.Wang@citrix.com] Enviado el: jueves,
>20 de septiembre de 2012 0:05
>Para: Marcos Ortiz
>CC: cloudstack-users@incubator.apache.org
>Asunto: RE: Force UI to be in English
>
>Marcos,
>
>Please try this:
>(1) in "/ui/index.jsp":
>replace
><div class="select-language">
>with      
><div class="select-language" style="display:none">
>
>(2) under "/client/WEB-INF/classes/resources/":
>keep "messages.properties", but delete everything else 
>(e.g."messages_es.properties", "messages_ja.properties",
>"messages_zh_CN.properties")
>
>(3) under your tomcat
>"C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>keep "messages.properties", but delete everything else 
>(e.g."messages_es.properties", "messages_ja.properties",
>"messages_zh_CN.properties")
>
>Jessica
>
>-----Original Message-----
>From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>Sent: Tuesday, September 18, 2012 9:44 PM
>To: Jessica Wang
>Subject: Re: Force UI to be in English
>
>I think i checked this option before and only removes the blank option 
>but the web loads with the browser default, I need to select English 
>option anyway.
>
>Marcos Ortiz Fernández
>IT Technical Engineer
>Anadat Consulting
>
>
>El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>escribió:
>
>> Marcos,
>> 
>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>> 
>> =====================================================================
>> = ============================================================
>> 
>> <div class="select-language">
>>    <select name="language">
>>        <option value=""></option>  //************ please remove this 
>>line ************
>>        <option value="en"><fmt:message 
>>key="label.lang.english"/></option>
>>        <option value="ja"><fmt:message 
>>key="label.lang.japanese"/></option>
>>        <option value="zh_CN"><fmt:message 
>>key="label.lang.chinese"/></option>
>>    </select>
>> </div>
>> 
>> =====================================================================
>> = ============================================================
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>> Sent: Tuesday, September 18, 2012 11:17 AM
>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>> Cc: cloudstack-dev@incubator.apache.org
>> Subject: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Cloudstack UI is using browser's default language as default.
>> 
>> To force UI to be in English instead of in browser's default 
>> language, please just remove one line from your \ui\index.jsp
>> 
>> =====================================================================
>> = ============================================================
>> 
>> <div class="select-language">
>>    <select name="language">
>>        <option value=""></option>  //************ please remove this 
>>line ************
>>        <option value="en"><fmt:message 
>>key="label.lang.english"/></option>
>>        <option value="ja"><fmt:message 
>>key="label.lang.japanese"/></option>
>>        <option value="zh_CN"><fmt:message 
>>key="label.lang.chinese"/></option>
>>    </select>
>> </div>
>> 
>> =====================================================================
>> = ============================================================
>> 
>> Jessica
>> 
>> 
>> 
>> -----Original Message-----
>> From: Chiradeep Vittal
>> Sent: Monday, September 17, 2012 10:04 PM
>> To: Jessica Wang
>> Subject: FW: Force UI to be in English
>> 
>> 
>> 
>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>> 
>>> Hi all
>>> 
>>> I am from Spain and I need to change the default language to English 
>>> instead to take the default from the browser.
>>> 
>>> I need this in order to avoid the bad translation to Spanish.
>>> 
>>> Thanks
>>> 
>>> 
>>> 
>> 
>
>
>
>






RE: Force UI to be in English

Posted by Marcos Ortiz <ma...@anadat.es>.
Hi,

Yes, but this option take the default language for the browser, in my case spanish, i need to web load by default in english instead spanish without change the browser locales.

I try your option but do not work for me.

Thanks for your help

Un saludo,


 Marcos Ortiz Fernández                  
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          



-----Mensaje original-----
De: Pranav Saxena [mailto:pranav.saxena@citrix.com] 
Enviado el: jueves, 20 de septiembre de 2012 14:03
Para: cloudstack-users@incubator.apache.org
Asunto: RE: Force UI to be in English

You could try commenting out the below mentioned portion of the code in index. jsp file by putting <%--  and  --%>  at the beginning and at the end  as shown below   .  This will hide all the options in the drop down for selecting the language type . This works for me.

<%--                                          <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->
                <option value="en"><fmt:message key="label.lang.english"/></option>
                <option value="ja"><fmt:message key="label.lang.japanese"/></option>
                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>                     --%>


Thanks,
Pranav
-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
Sent: Thursday, September 20, 2012 5:27 PM
To: cloudstack-users@incubator.apache.org
Subject: RE: Force UI to be in English

Hi Mat

Do not work for me

Un saludo,


 Marcos Ortiz Fernández
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          



-----Mensaje original-----
De: Matty Courtney [mailto:matty.courtney@citrix.com]
Enviado el: jueves, 20 de septiembre de 2012 12:53
Para: cloudstack-users@incubator.apache.org
Asunto: Re: Force UI to be in English

I haven't had a chance to test this but you could also try changing <option value="en"> to <option value="en" selected="selected"> in index.jsp (as well as the changes suggested below)


On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:

>Hi,
>
>Whit those changes, i haven´t got the combo box to display language and 
>i can´t login
>
>Regards
>
>
>-----Mensaje original-----
>De: Jessica Wang [mailto:Jessica.Wang@citrix.com] Enviado el: jueves,
>20 de septiembre de 2012 0:05
>Para: Marcos Ortiz
>CC: cloudstack-users@incubator.apache.org
>Asunto: RE: Force UI to be in English
>
>Marcos,
>
>Please try this:
>(1) in "/ui/index.jsp":
>replace
><div class="select-language">
>with      
><div class="select-language" style="display:none">
>
>(2) under "/client/WEB-INF/classes/resources/":
>keep "messages.properties", but delete everything else 
>(e.g."messages_es.properties", "messages_ja.properties",
>"messages_zh_CN.properties")
>
>(3) under your tomcat
>"C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>keep "messages.properties", but delete everything else 
>(e.g."messages_es.properties", "messages_ja.properties",
>"messages_zh_CN.properties")
>
>Jessica
>
>-----Original Message-----
>From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>Sent: Tuesday, September 18, 2012 9:44 PM
>To: Jessica Wang
>Subject: Re: Force UI to be in English
>
>I think i checked this option before and only removes the blank option 
>but the web loads with the browser default, I need to select English 
>option anyway.
>
>Marcos Ortiz Fernández
>IT Technical Engineer
>Anadat Consulting
>
>
>El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>escribió:
>
>> Marcos,
>> 
>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>> 
>> =====================================================================
>> = ============================================================
>> 
>> <div class="select-language">
>>    <select name="language">
>>        <option value=""></option>  //************ please remove this 
>>line ************
>>        <option value="en"><fmt:message 
>>key="label.lang.english"/></option>
>>        <option value="ja"><fmt:message 
>>key="label.lang.japanese"/></option>
>>        <option value="zh_CN"><fmt:message 
>>key="label.lang.chinese"/></option>
>>    </select>
>> </div>
>> 
>> =====================================================================
>> = ============================================================
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>> Sent: Tuesday, September 18, 2012 11:17 AM
>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>> Cc: cloudstack-dev@incubator.apache.org
>> Subject: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Cloudstack UI is using browser's default language as default.
>> 
>> To force UI to be in English instead of in browser's default 
>> language, please just remove one line from your \ui\index.jsp
>> 
>> =====================================================================
>> = ============================================================
>> 
>> <div class="select-language">
>>    <select name="language">
>>        <option value=""></option>  //************ please remove this 
>>line ************
>>        <option value="en"><fmt:message 
>>key="label.lang.english"/></option>
>>        <option value="ja"><fmt:message 
>>key="label.lang.japanese"/></option>
>>        <option value="zh_CN"><fmt:message 
>>key="label.lang.chinese"/></option>
>>    </select>
>> </div>
>> 
>> =====================================================================
>> = ============================================================
>> 
>> Jessica
>> 
>> 
>> 
>> -----Original Message-----
>> From: Chiradeep Vittal
>> Sent: Monday, September 17, 2012 10:04 PM
>> To: Jessica Wang
>> Subject: FW: Force UI to be in English
>> 
>> 
>> 
>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>> 
>>> Hi all
>>> 
>>> I am from Spain and I need to change the default language to English 
>>> instead to take the default from the browser.
>>> 
>>> I need this in order to avoid the bad translation to Spanish.
>>> 
>>> Thanks
>>> 
>>> 
>>> 
>> 
>
>
>
>






RE: Force UI to be in English

Posted by Pranav Saxena <pr...@citrix.com>.
You could try commenting out the below mentioned portion of the code in index. jsp file by putting <%--  and  --%>  at the beginning and at the end  as shown below   .  This will hide all the options in the drop down for selecting the language type . This works for me.

<%--                                          <option value=""></option> <!-- when this blank option is selected, browsers default language will be used -->
                <option value="en"><fmt:message key="label.lang.english"/></option>
                <option value="ja"><fmt:message key="label.lang.japanese"/></option>
                                                                <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>                     --%>


Thanks,
Pranav
-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es] 
Sent: Thursday, September 20, 2012 5:27 PM
To: cloudstack-users@incubator.apache.org
Subject: RE: Force UI to be in English

Hi Mat

Do not work for me

Un saludo,


 Marcos Ortiz Fernández
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          



-----Mensaje original-----
De: Matty Courtney [mailto:matty.courtney@citrix.com]
Enviado el: jueves, 20 de septiembre de 2012 12:53
Para: cloudstack-users@incubator.apache.org
Asunto: Re: Force UI to be in English

I haven't had a chance to test this but you could also try changing <option value="en"> to <option value="en" selected="selected"> in index.jsp (as well as the changes suggested below)


On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:

>Hi,
>
>Whit those changes, i haven´t got the combo box to display language and 
>i can´t login
>
>Regards
>
>
>-----Mensaje original-----
>De: Jessica Wang [mailto:Jessica.Wang@citrix.com] Enviado el: jueves,
>20 de septiembre de 2012 0:05
>Para: Marcos Ortiz
>CC: cloudstack-users@incubator.apache.org
>Asunto: RE: Force UI to be in English
>
>Marcos,
>
>Please try this:
>(1) in "/ui/index.jsp":
>replace
><div class="select-language">
>with      
><div class="select-language" style="display:none">
>
>(2) under "/client/WEB-INF/classes/resources/":
>keep "messages.properties", but delete everything else 
>(e.g."messages_es.properties", "messages_ja.properties",
>"messages_zh_CN.properties")
>
>(3) under your tomcat
>"C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>keep "messages.properties", but delete everything else 
>(e.g."messages_es.properties", "messages_ja.properties",
>"messages_zh_CN.properties")
>
>Jessica
>
>-----Original Message-----
>From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>Sent: Tuesday, September 18, 2012 9:44 PM
>To: Jessica Wang
>Subject: Re: Force UI to be in English
>
>I think i checked this option before and only removes the blank option 
>but the web loads with the browser default, I need to select English 
>option anyway.
>
>Marcos Ortiz Fernández
>IT Technical Engineer
>Anadat Consulting
>
>
>El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>escribió:
>
>> Marcos,
>> 
>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>> 
>> =====================================================================
>> = ============================================================
>> 
>> <div class="select-language">
>>    <select name="language">
>>        <option value=""></option>  //************ please remove this 
>>line ************
>>        <option value="en"><fmt:message 
>>key="label.lang.english"/></option>
>>        <option value="ja"><fmt:message 
>>key="label.lang.japanese"/></option>
>>        <option value="zh_CN"><fmt:message 
>>key="label.lang.chinese"/></option>
>>    </select>
>> </div>
>> 
>> =====================================================================
>> = ============================================================
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>> Sent: Tuesday, September 18, 2012 11:17 AM
>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>> Cc: cloudstack-dev@incubator.apache.org
>> Subject: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Cloudstack UI is using browser's default language as default.
>> 
>> To force UI to be in English instead of in browser's default 
>> language, please just remove one line from your \ui\index.jsp
>> 
>> =====================================================================
>> = ============================================================
>> 
>> <div class="select-language">
>>    <select name="language">
>>        <option value=""></option>  //************ please remove this 
>>line ************
>>        <option value="en"><fmt:message 
>>key="label.lang.english"/></option>
>>        <option value="ja"><fmt:message 
>>key="label.lang.japanese"/></option>
>>        <option value="zh_CN"><fmt:message 
>>key="label.lang.chinese"/></option>
>>    </select>
>> </div>
>> 
>> =====================================================================
>> = ============================================================
>> 
>> Jessica
>> 
>> 
>> 
>> -----Original Message-----
>> From: Chiradeep Vittal
>> Sent: Monday, September 17, 2012 10:04 PM
>> To: Jessica Wang
>> Subject: FW: Force UI to be in English
>> 
>> 
>> 
>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>> 
>>> Hi all
>>> 
>>> I am from Spain and I need to change the default language to English 
>>> instead to take the default from the browser.
>>> 
>>> I need this in order to avoid the bad translation to Spanish.
>>> 
>>> Thanks
>>> 
>>> 
>>> 
>> 
>
>
>
>




RE: Force UI to be in English

Posted by Marcos Ortiz <ma...@anadat.es>.
Hi Mat

Do not work for me

Un saludo,


 Marcos Ortiz Fernández                  
 IT Technical Engineer  

 Parque Empresarial Rivas Futura             Teléfono:  +34  902 196 047
 Calle Marie Curie 7 Edificio Beta              Fax :          +34  915 275 904
 28521 - Madrid                                          



-----Mensaje original-----
De: Matty Courtney [mailto:matty.courtney@citrix.com] 
Enviado el: jueves, 20 de septiembre de 2012 12:53
Para: cloudstack-users@incubator.apache.org
Asunto: Re: Force UI to be in English

I haven't had a chance to test this but you could also try changing <option value="en"> to <option value="en" selected="selected"> in index.jsp (as well as the changes suggested below)


On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:

>Hi,
>
>Whit those changes, i haven´t got the combo box to display language and 
>i can´t login
>
>Regards
>
>
>-----Mensaje original-----
>De: Jessica Wang [mailto:Jessica.Wang@citrix.com] Enviado el: jueves, 
>20 de septiembre de 2012 0:05
>Para: Marcos Ortiz
>CC: cloudstack-users@incubator.apache.org
>Asunto: RE: Force UI to be in English
>
>Marcos,
>
>Please try this:
>(1) in "/ui/index.jsp":
>replace
><div class="select-language">
>with      
><div class="select-language" style="display:none">
>
>(2) under "/client/WEB-INF/classes/resources/":
>keep "messages.properties", but delete everything else 
>(e.g."messages_es.properties", "messages_ja.properties",
>"messages_zh_CN.properties")
>
>(3) under your tomcat
>"C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>keep "messages.properties", but delete everything else 
>(e.g."messages_es.properties", "messages_ja.properties",
>"messages_zh_CN.properties")
>
>Jessica
>
>-----Original Message-----
>From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>Sent: Tuesday, September 18, 2012 9:44 PM
>To: Jessica Wang
>Subject: Re: Force UI to be in English
>
>I think i checked this option before and only removes the blank option 
>but the web loads with the browser default, I need to select English 
>option anyway.
>
>Marcos Ortiz Fernández
>IT Technical Engineer
>Anadat Consulting
>
>
>El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>escribió:
>
>> Marcos,
>> 
>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>> 
>> =====================================================================
>> = ============================================================
>> 
>> <div class="select-language">
>>    <select name="language">
>>        <option value=""></option>  //************ please remove this 
>>line ************
>>        <option value="en"><fmt:message 
>>key="label.lang.english"/></option>
>>        <option value="ja"><fmt:message 
>>key="label.lang.japanese"/></option>
>>        <option value="zh_CN"><fmt:message 
>>key="label.lang.chinese"/></option>
>>    </select>
>> </div>
>> 
>> =====================================================================
>> = ============================================================
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>> Sent: Tuesday, September 18, 2012 11:17 AM
>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>> Cc: cloudstack-dev@incubator.apache.org
>> Subject: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Cloudstack UI is using browser's default language as default.
>> 
>> To force UI to be in English instead of in browser's default 
>> language, please just remove one line from your \ui\index.jsp
>> 
>> =====================================================================
>> = ============================================================
>> 
>> <div class="select-language">
>>    <select name="language">
>>        <option value=""></option>  //************ please remove this 
>>line ************
>>        <option value="en"><fmt:message 
>>key="label.lang.english"/></option>
>>        <option value="ja"><fmt:message 
>>key="label.lang.japanese"/></option>
>>        <option value="zh_CN"><fmt:message 
>>key="label.lang.chinese"/></option>
>>    </select>
>> </div>
>> 
>> =====================================================================
>> = ============================================================
>> 
>> Jessica
>> 
>> 
>> 
>> -----Original Message-----
>> From: Chiradeep Vittal
>> Sent: Monday, September 17, 2012 10:04 PM
>> To: Jessica Wang
>> Subject: FW: Force UI to be in English
>> 
>> 
>> 
>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>> 
>>> Hi all
>>> 
>>> I am from Spain and I need to change the default language to English 
>>> instead to take the default from the browser.
>>> 
>>> I need this in order to avoid the bad translation to Spanish.
>>> 
>>> Thanks
>>> 
>>> 
>>> 
>> 
>
>
>
>




Re: Force UI to be in English

Posted by Matty Courtney <ma...@citrix.com>.
I haven't had a chance to test this but you could also try changing
<option value="en"> to <option value="en" selected="selected"> in
index.jsp (as well as the changes suggested below)


On 20/09/12 8:32 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:

>Hi,
>
>Whit those changes, i haven´t got the combo box to display language and i
>can´t login
>
>Regards
>
>
>-----Mensaje original-----
>De: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>Enviado el: jueves, 20 de septiembre de 2012 0:05
>Para: Marcos Ortiz
>CC: cloudstack-users@incubator.apache.org
>Asunto: RE: Force UI to be in English
>
>Marcos,
>
>Please try this:
>(1) in "/ui/index.jsp":
>replace 
><div class="select-language">
>with      
><div class="select-language" style="display:none">
>
>(2) under "/client/WEB-INF/classes/resources/":
>keep "messages.properties", but delete everything else
>(e.g."messages_es.properties", "messages_ja.properties",
>"messages_zh_CN.properties")
>
>(3) under your tomcat
>"C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
>keep "messages.properties", but delete everything else
>(e.g."messages_es.properties", "messages_ja.properties",
>"messages_zh_CN.properties")
>
>Jessica
>
>-----Original Message-----
>From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
>Sent: Tuesday, September 18, 2012 9:44 PM
>To: Jessica Wang
>Subject: Re: Force UI to be in English
>
>I think i checked this option before and only removes the blank option
>but the web loads with the browser default, I need to select English
>option anyway.
>
>Marcos Ortiz Fernández
>IT Technical Engineer
>Anadat Consulting
>
>
>El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com>
>escribió:
>
>> Marcos,
>> 
>> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
>> 
>> ======================================================================
>> ============================================================
>> 
>> <div class="select-language">
>>    <select name="language">
>>        <option value=""></option>  //************ please remove this
>>line ************
>>        <option value="en"><fmt:message
>>key="label.lang.english"/></option>
>>        <option value="ja"><fmt:message
>>key="label.lang.japanese"/></option>
>>        <option value="zh_CN"><fmt:message
>>key="label.lang.chinese"/></option>
>>    </select>
>> </div>
>> 
>> ======================================================================
>> ============================================================
>> 
>> Jessica
>> 
>> -----Original Message-----
>> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
>> Sent: Tuesday, September 18, 2012 11:17 AM
>> To: marcos_ortiz@anadat.es; Chiradeep Vittal
>> Cc: cloudstack-dev@incubator.apache.org
>> Subject: RE: Force UI to be in English
>> 
>> Marcos,
>> 
>> Cloudstack UI is using browser's default language as default.
>> 
>> To force UI to be in English instead of in browser's default language,
>> please just remove one line from your \ui\index.jsp
>> 
>> ======================================================================
>> ============================================================
>> 
>> <div class="select-language">
>>    <select name="language">
>>        <option value=""></option>  //************ please remove this
>>line ************
>>        <option value="en"><fmt:message
>>key="label.lang.english"/></option>
>>        <option value="ja"><fmt:message
>>key="label.lang.japanese"/></option>
>>        <option value="zh_CN"><fmt:message
>>key="label.lang.chinese"/></option>
>>    </select>
>> </div>
>> 
>> ======================================================================
>> ============================================================
>> 
>> Jessica
>> 
>> 
>> 
>> -----Original Message-----
>> From: Chiradeep Vittal
>> Sent: Monday, September 17, 2012 10:04 PM
>> To: Jessica Wang
>> Subject: FW: Force UI to be in English
>> 
>> 
>> 
>> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
>> 
>>> Hi all
>>> 
>>> I am from Spain and I need to change the default language to English
>>> instead to take the default from the browser.
>>> 
>>> I need this in order to avoid the bad translation to Spanish.
>>> 
>>> Thanks
>>> 
>>> 
>>> 
>> 
>
>
>
>


RE: Force UI to be in English

Posted by Marcos Ortiz <ma...@anadat.es>.
Hi,

Whit those changes, i haven´t got the combo box to display language and i can´t login

Regards


-----Mensaje original-----
De: Jessica Wang [mailto:Jessica.Wang@citrix.com] 
Enviado el: jueves, 20 de septiembre de 2012 0:05
Para: Marcos Ortiz
CC: cloudstack-users@incubator.apache.org
Asunto: RE: Force UI to be in English

Marcos,

Please try this:
(1) in "/ui/index.jsp": 
replace 
<div class="select-language">      
with      
<div class="select-language" style="display:none">

(2) under "/client/WEB-INF/classes/resources/":
keep "messages.properties", but delete everything else (e.g."messages_es.properties", "messages_ja.properties", "messages_zh_CN.properties")

(3) under your tomcat "C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
keep "messages.properties", but delete everything else (e.g."messages_es.properties", "messages_ja.properties", "messages_zh_CN.properties")

Jessica

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es]
Sent: Tuesday, September 18, 2012 9:44 PM
To: Jessica Wang
Subject: Re: Force UI to be in English

I think i checked this option before and only removes the blank option but the web loads with the browser default, I need to select English option anyway.

Marcos Ortiz Fernández
IT Technical Engineer
Anadat Consulting


El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com> escribió:

> Marcos,
> 
> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
> 
> ======================================================================
> ============================================================
> 
> <div class="select-language">
>    <select name="language">
>        <option value=""></option>  //************ please remove this line ************
>        <option value="en"><fmt:message key="label.lang.english"/></option>
>        <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>        <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>
>    </select>
> </div>
> 
> ======================================================================
> ============================================================
> 
> Jessica
> 
> -----Original Message-----
> From: Jessica Wang [mailto:Jessica.Wang@citrix.com]
> Sent: Tuesday, September 18, 2012 11:17 AM
> To: marcos_ortiz@anadat.es; Chiradeep Vittal
> Cc: cloudstack-dev@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Marcos,
> 
> Cloudstack UI is using browser's default language as default.
> 
> To force UI to be in English instead of in browser's default language, 
> please just remove one line from your \ui\index.jsp
> 
> ======================================================================
> ============================================================
> 
> <div class="select-language">
>    <select name="language">
>        <option value=""></option>  //************ please remove this line ************
>        <option value="en"><fmt:message key="label.lang.english"/></option>
>        <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>        <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>
>    </select>
> </div>
> 
> ======================================================================
> ============================================================
> 
> Jessica
> 
> 
> 
> -----Original Message-----
> From: Chiradeep Vittal
> Sent: Monday, September 17, 2012 10:04 PM
> To: Jessica Wang
> Subject: FW: Force UI to be in English
> 
> 
> 
> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
> 
>> Hi all
>> 
>> I am from Spain and I need to change the default language to English 
>> instead to take the default from the browser.
>> 
>> I need this in order to avoid the bad translation to Spanish.
>> 
>> Thanks
>> 
>> 
>> 
> 





RE: Force UI to be in English

Posted by Jessica Wang <Je...@citrix.com>.
Marcos,

Please try this:
(1) in "/ui/index.jsp": 
replace 
<div class="select-language">      
with      
<div class="select-language" style="display:none">

(2) under "/client/WEB-INF/classes/resources/":
keep "messages.properties", but delete everything else (e.g."messages_es.properties", "messages_ja.properties", "messages_zh_CN.properties")

(3) under your tomcat "C:\apache-tomcat-x.x.xx\webapps\client\WEB-INF\classes\resources\":
keep "messages.properties", but delete everything else (e.g."messages_es.properties", "messages_ja.properties", "messages_zh_CN.properties")

Jessica

-----Original Message-----
From: Marcos Ortiz [mailto:marcos_ortiz@anadat.es] 
Sent: Tuesday, September 18, 2012 9:44 PM
To: Jessica Wang
Subject: Re: Force UI to be in English

I think i checked this option before and only removes the blank option but the web loads with the browser default, I need to select English option anyway.

Marcos Ortiz Fernández
IT Technical Engineer  
Anadat Consulting


El 18/09/2012, a las 23:47, "Jessica Wang" <Je...@citrix.com> escribió:

> Marcos,
> 
> My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.
> 
> ==================================================================================================================================
> 
> <div class="select-language">
>    <select name="language">
>        <option value=""></option>  //************ please remove this line ************
>        <option value="en"><fmt:message key="label.lang.english"/></option>
>        <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>        <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>
>    </select>
> </div>
> 
> ==================================================================================================================================
> 
> Jessica
> 
> -----Original Message-----
> From: Jessica Wang [mailto:Jessica.Wang@citrix.com] 
> Sent: Tuesday, September 18, 2012 11:17 AM
> To: marcos_ortiz@anadat.es; Chiradeep Vittal
> Cc: cloudstack-dev@incubator.apache.org
> Subject: RE: Force UI to be in English
> 
> Marcos,
> 
> Cloudstack UI is using browser's default language as default.
> 
> To force UI to be in English instead of in browser's default language, please just remove one line from your \ui\index.jsp 
> 
> ==================================================================================================================================
> 
> <div class="select-language">
>    <select name="language">
>        <option value=""></option>  //************ please remove this line ************
>        <option value="en"><fmt:message key="label.lang.english"/></option>
>        <option value="ja"><fmt:message key="label.lang.japanese"/></option>
>        <option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>
>    </select>
> </div>
> 
> ==================================================================================================================================
> 
> Jessica
> 
> 
> 
> -----Original Message-----
> From: Chiradeep Vittal 
> Sent: Monday, September 17, 2012 10:04 PM
> To: Jessica Wang
> Subject: FW: Force UI to be in English
> 
> 
> 
> On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:
> 
>> Hi all
>> 
>> I am from Spain and I need to change the default language to English
>> instead to take the default from the browser.
>> 
>> I need this in order to avoid the bad translation to Spanish.
>> 
>> Thanks
>> 
>> 
>> 
> 



RE: Force UI to be in English

Posted by Jessica Wang <Je...@citrix.com>.
Marcos,

My reply is for CS 3.0.4 cloud platform, not CS 2.2.x.

==================================================================================================================================

<div class="select-language">
	<select name="language">
		<option value=""></option>  //************ please remove this line ************
		<option value="en"><fmt:message key="label.lang.english"/></option>
		<option value="ja"><fmt:message key="label.lang.japanese"/></option>
		<option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>
	</select>
</div>

==================================================================================================================================

Jessica

-----Original Message-----
From: Jessica Wang [mailto:Jessica.Wang@citrix.com] 
Sent: Tuesday, September 18, 2012 11:17 AM
To: marcos_ortiz@anadat.es; Chiradeep Vittal
Cc: cloudstack-dev@incubator.apache.org
Subject: RE: Force UI to be in English

Marcos,

Cloudstack UI is using browser's default language as default.

To force UI to be in English instead of in browser's default language, please just remove one line from your \ui\index.jsp 

==================================================================================================================================

<div class="select-language">
	<select name="language">
		<option value=""></option>  //************ please remove this line ************
		<option value="en"><fmt:message key="label.lang.english"/></option>
		<option value="ja"><fmt:message key="label.lang.japanese"/></option>
		<option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>
	</select>
</div>

==================================================================================================================================

Jessica



-----Original Message-----
From: Chiradeep Vittal 
Sent: Monday, September 17, 2012 10:04 PM
To: Jessica Wang
Subject: FW: Force UI to be in English



On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:

>Hi all
>
>I am from Spain and I need to change the default language to English
>instead to take the default from the browser.
>
>I need this in order to avoid the bad translation to Spanish.
>
>Thanks
>
>
>


RE: Force UI to be in English

Posted by Jessica Wang <Je...@citrix.com>.
Marcos,

Cloudstack UI is using browser's default language as default.

To force UI to be in English instead of in browser's default language, please just remove one line from your \ui\index.jsp 

==================================================================================================================================

<div class="select-language">
	<select name="language">
		<option value=""></option>  //************ please remove this line ************
		<option value="en"><fmt:message key="label.lang.english"/></option>
		<option value="ja"><fmt:message key="label.lang.japanese"/></option>
		<option value="zh_CN"><fmt:message key="label.lang.chinese"/></option>
	</select>
</div>

==================================================================================================================================

Jessica



-----Original Message-----
From: Chiradeep Vittal 
Sent: Monday, September 17, 2012 10:04 PM
To: Jessica Wang
Subject: FW: Force UI to be in English



On 9/17/12 9:43 PM, "Marcos Ortiz" <ma...@anadat.es> wrote:

>Hi all
>
>I am from Spain and I need to change the default language to English
>instead to take the default from the browser.
>
>I need this in order to avoid the bad translation to Spanish.
>
>Thanks
>
>
>