Personal tools

Log in

Changes

From All n One's bxp software Wixi

Jump to: navigation, search

Forms Language Bar

8,351 bytes added, 11:31, 20 August 2015
no edit summary
[[File:languagebar_005.png|600xpx]]
 
 
== Other parts ==
 
 
There are other functional elements on the page but all of them have Ids which can be manipulated, or else can have a div put around them to allow them to be changed.
 
 
If you have further questions please email support@bxpsoftware.com for further details.
 
 
 
= Translations =
 
 
Once you are absolutely positive that you have all the functional elements you want to control changing (as demonstrated above), then and only then should you send out to get your strings translated.
 
 
It is important that your functional review confirm all the elements that need to change before you get your strings.
 
 
To translate the items, you can use cool tools like Google Translate, or you can send the file out to a professional company to do the translations for you.
 
 
So the final Opening Instructions will look like
 
<syntaxhighlight lang="javascript">
<div id='strOpening'>Good --period--. My name is --firstname--. How can I help?</div><br />
 
<script type="text/javascript" language="javascript">
function fn_LanguageChange(strLanguage){
//Page variables.
var strUsername = document.getElementById('strBEDisplayed_Username').value;
//Other page elements
var strName_Title = document.getElementById('objHeading_strCDA_782_field_0_2');
var strName_Firstname = document.getElementById('objHeading_strCDA_782_field_1_2');
var strName_Initial = document.getElementById('objHeading_strCDA_782_field_2_2');
var strName_Surname = document.getElementById('objHeading_strCDA_782_field_3_2');
var strButton_Similar = document.getElementById('btnFind_SimilarstrCDA_782_field_1_2');
var objColourList = document.getElementById('strCDA_782_field_0_7');
//List out all the items to be changed
var strOpening = document.getElementById('strOpening');
var strName = document.getElementById('strName');
var strNumber = document.getElementById('strNumber');
var strColour = document.getElementById('strColour');
 
//Now we adapt the strings for each language
if (strLanguage == 'US'){
strButton_Similar.value = 'Find Similar';
strName_Title.innerHTML = 'Title';
strName_Firstname.innerHTML = 'Firstname';
strName_Initial.innerHTML = 'Initial';
strName_Surname.innerHTML = 'Surname';
strOpening.innerHTML = 'Good morning. My name is Admin. How can I help?';
strName.innerHTML = 'Can I ask your name please?';
strNumber.innerHTML = 'Can I get a phone number please?';
strColour.innerHTML = 'What is your favourite colour?';
objColourList.options.length = 0;
objColourList.options[objColourList.length] = new Option('''', '''');
objColourList.options[objColourList.length] = new Option('Red', 'Red');
objColourList.options[objColourList.length] = new Option('Green', 'Green');
objColourList.options[objColourList.length] = new Option('Blue', 'Blue');
}
else if (strLanguage == 'IE'){
strButton_Similar.value = 'Comhchosúla';
strName_Title.innerHTML = 'Teideal';
strName_Firstname.innerHTML = 'Céadainm';
strName_Initial.innerHTML = 'Ainm lár';
strName_Surname.innerHTML = 'Sloinne';
strOpening.innerHTML = 'Dea-maidin. Is é mo ainm Riarachán. Conas is féidir liom cabhrú?';
strName.innerHTML = 'An féidir liom a iarraidh ar do ainm le do thoil?';
strNumber.innerHTML = 'An féidir liom a uimhir theileafóin a fháil le do thoil?';
strColour.innerHTML = 'Cad é do dath is fearr leat?';
objColourList.options.length = 0;
objColourList.options[objColourList.length] = new Option('''', '''');
objColourList.options[objColourList.length] = new Option('Dearg', 'Red');
objColourList.options[objColourList.length] = new Option('Glas', 'Green');
objColourList.options[objColourList.length] = new Option('Blue', 'Blue');
}
else if (strLanguage == 'FR'){
strButton_Similar.value = 'Similaire';
strName_Title.innerHTML = 'Titre';
strName_Firstname.innerHTML = 'Prénom';
strName_Initial.innerHTML = 'Initiale';
strName_Surname.innerHTML = 'Nom de famille';
strOpening.innerHTML = 'Bonjour. Mon nom est Admin. Comment puis-je aider?';
strName.innerHTML = 'Puis-je vous demander votre nom s\'il vous plaît?';
strNumber.innerHTML = 'Puis-je obtenir un numéro de téléphone s\'il vous plaît?';
strColour.innerHTML = 'Quelle est ta couleur préférée?';
objColourList.options.length = 0;
objColourList.options[objColourList.length] = new Option('''', '''');
objColourList.options[objColourList.length] = new Option('Red', 'Red');
objColourList.options[objColourList.length] = new Option('Green', 'Green');
objColourList.options[objColourList.length] = new Option('Blue', 'Blue');
}
else if (strLanguage == 'ES'){
strButton_Similar.value = 'Similares';
strName_Title.innerHTML = 'Título';
strName_Firstname.innerHTML = 'Nombre de pila';
strName_Initial.innerHTML = 'Inicial';
strName_Surname.innerHTML = 'Apellido';
strOpening.innerHTML = 'Buenos días. Mi nombre es admin. ¿Cómo puedo ayudar?';
strName.innerHTML = '¿Puedo preguntarle su nombre, por favor?';
strNumber.innerHTML = '¿Puedo obtener un número de teléfono por favor?';
strColour.innerHTML = '¿Cuál es tu color favorito?';
objColourList.options.length = 0;
objColourList.options[objColourList.length] = new Option('''', '''');
objColourList.options[objColourList.length] = new Option('Rojo', 'Red');
objColourList.options[objColourList.length] = new Option('Verde', 'Green');
objColourList.options[objColourList.length] = new Option('Azul', 'Blue');
}
else if (strLanguage == 'DE'){
strButton_Similar.value = 'ähnliche';
strName_Title.innerHTML = 'Titel';
strName_Firstname.innerHTML = 'Vorname';
strName_Initial.innerHTML = 'Initiale';
strName_Surname.innerHTML = 'Nachname';
strOpening.innerHTML = 'Guten Morgen. Mein Name ist Admin. Wie kann ich helfen?';
strName.innerHTML = 'Kann ich Ihren Namen bitte?';
strNumber.innerHTML = 'Kann ich eine Telefonnummer bitte?';
strColour.innerHTML = 'Was ist Ihre Lieblingsfarbe?';
objColourList.options.length = 0;
objColourList.options[objColourList.length] = new Option('''', '''');
objColourList.options[objColourList.length] = new Option('Rote', 'Red');
objColourList.options[objColourList.length] = new Option('Grün', 'Green');
objColourList.options[objColourList.length] = new Option('Blau', 'Blue');
}
else if (strLanguage == 'PT'){
strButton_Similar.value = 'Similar';
strName_Title.innerHTML = 'Título';
strName_Firstname.innerHTML = 'Primeiro';
strName_Initial.innerHTML = 'Inicial';
strName_Surname.innerHTML = 'Sobrenome';
strOpening.innerHTML = 'Bom Dia. Meu nome é administrador. Como posso ajudar?';
strName.innerHTML = 'Posso perguntar seu nome, por favor?';
strNumber.innerHTML = 'Posso obter um número de telefone, por favor?';
strColour.innerHTML = 'Qual é a sua cor favorita?';
objColourList.options.length = 0;
objColourList.options[objColourList.length] = new Option('''', '''');
objColourList.options[objColourList.length] = new Option('Vermelho', 'Red');
objColourList.options[objColourList.length] = new Option('Verde', 'Green');
objColourList.options[objColourList.length] = new Option('Azul', 'Blue');
}
else if (strLanguage == 'PL'){
strButton_Similar.value = 'Podobne';
strName_Title.innerHTML = 'Tytuł';
strName_Firstname.innerHTML = 'Imię';
strName_Initial.innerHTML = 'Początkowy';
strName_Surname.innerHTML = 'Nazwisko';
strOpening.innerHTML = 'Dzień dobry. Nazywam się Admin. Jak mogę pomóc?';
strName.innerHTML = 'Mogę zadać swoje nazwisko proszę?';
strNumber.innerHTML = 'Czy mogę otrzymać numer telefonu należy?';
strColour.innerHTML = 'Jaki jest Twój ulubiony kolor?';
objColourList.options.length = 0;
objColourList.options[objColourList.length] = new Option('''', '''');
objColourList.options[objColourList.length] = new Option('Czerwony', 'Red');
objColourList.options[objColourList.length] = new Option('Zielony', 'Green');
objColourList.options[objColourList.length] = new Option('Niebieski', 'Blue');
}
}
</script>
</syntaxhighlight>
7,528
edits