26
Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

Embed Size (px)

Citation preview

Page 1: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

Building Multilingual Applications

- The Hebrew Challenge

Presented by Yigal AyalonGo4Application

Page 2: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

The impossible we do at once,

miracles take a little longer

Page 3: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

• About the project• What is the problem?• What need to be done?• Text Dictionary• Why Hebrew is different?• Setting Hebrew on UX

What will be covered

Page 4: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

• Drop Down Lists• Setting dynamic values to text label• Use of Templates• Demo• Q & A

What will be covered

Page 5: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

About the project

Page 6: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application
Page 7: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application
Page 8: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

• The candidate is filling a request form• After the committee approved the request the candidate

become a tenant• The tenant need to pay for the room expenses by giving 4

checks in advance for the full year • After 2 years he can request for a 3rd year and if he is eligible

he can stay for the 3rd year• At the end of the period he leaves the building

Life Cycle in the house

Page 9: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

What is the problem?

• What we are trying to solve?• Is there really a need for Multilingual Applications?• Why do we need to have applications that are not in

English?

Page 10: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

What is the problem?

Submit Cancel Sort Record

French Soumettre Annuler Sorte Régistre

German Eingabe Abbruch Sortieren Aufnehmen

Dutch Verzenden Annuleren Sorteren Opnemen

Hebrew בצע עדכון ביטול מיון רשומה

• The reason is obvious, our customers wants to have the application on their native language.

Page 11: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

• Alpha has a very good way to handle the different text that will appear for each language.

• It is the Text Dictionary option that use the special tags <a5:t> </a5:t> and the session variable session.__protected__activeLanguage that should be set for the customer preferred language.

• You need to add the <a5:t> tags to every static text. – There is a internationalization Helper Utility in the Alpha

developer that will help you. (Show Demo)

What need to be done?

Page 12: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

• Add an entry in the text dictionary table with the proper translation.

• Set the active Language to the customer chosen language.

What need to be done?

Page 13: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

• And here is how it is done in the Text Dictionary:

Text Dictionary

Page 14: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

• With Hebrew we are facing a bit complex situation

• Hebrew is a Right to Left language

לשמאל • מימין כותבים עברית• It is not just the text direction• The whole behavior of the page should be from

Right to Left.

Why Hebrew is different?

Page 15: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

• There are a lot of changes that need to be done in order to display a UX component properly.– Setting the Local CSS with the following:

• body { direction:rtl; }• .A5CWLayout { float:right; }

– Set the default direction for the title bar on pop-up windows to be RTL

– When setting Javascript action to open a window you need to set the Window title direction to be RTL

Setting Hebrew on UX

Page 16: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

– When using a list control it should be in a container that should have its style set to: direction:ltr;

– Need to make a change to the Local sub-theme definitions – Javascript and CSS to have the sort mark on the left side.

Setting Hebrew on UX

Page 17: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

Why it is so important to set the direction to RTL for Hebrew field?• There are 2 setting that need to be set:

– text-align: right;– direction: rtl;

• Setting just the text-align will get the following result

עם עברית English כתיבה מעורבת• When adding the direction it will fix this mix sentence.

עם עבריתEnglishכתיבה מעורבת

Setting Hebrew on UX

Page 18: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

• Although a page is set to Hebrew, there are some field types that need to be always set to LTR, like:– Email address– Numbers– Date and time

• Where there is a button to continue to the next page or month on a date picker it should be set to go to the left and not to the right as it is now the default behavior.

Setting Hebrew on UX

Page 19: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

• Since we can’t use Hebrew for setting a drop down list in the Alpha editor, I created a table with the following structure:– List Name– List Value– Save Value

• Getting the values to the Drop Down list is easy, all lists are in just one table

Drop Down Lists

Page 20: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

• I created a UX that handle the Drop Lists table:

Drop Down Lists

Page 21: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

• In some case you need to have a label with values in the text that is dependent on the data

• In the text dictionary there is the following entry:

Setting dynamic values to text label

Page 22: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

• In the OnDialogInitialize Server Side Event you should get the values for the 2 variables, add them to the args and have the following code to create the label:Free_Rooms_Msg = GetHebText("Free Rooms Msg")

e.control.Free_Rooms_Msg = replace_placeholders_with_argument_values(Free_Rooms_Msg,args)

And the result is here:

Setting dynamic values to text label

Page 23: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

• In case there is a need to create a printed page with data from the application it can be done very easy by using a template with variables place holders and create an HTML page ready for printing.

• Here is a sample for a receipt printout.

Use of Templates

Page 24: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

• Show_Receipt_Detail.a5w in html editor

• Show the application

Demo

Page 25: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

Q & A

• Its time for your questions

Page 26: Building Multilingual Applications - The Hebrew Challenge Presented by Yigal Ayalon Go4Application

• If you like to get contact with me, my contact information is:– Email: [email protected]– Phone: +972-52-4670010

Thanks for Listening