Presentation is loading. Please wait.

Presentation is loading. Please wait.

© eCoLoTrain Software localization Localization Formats Characteristics, localization strategies Dipl.-Übersetzer Daniel Zielinski Dept. 4.6 - Saarland.

Similar presentations


Presentation on theme: "© eCoLoTrain Software localization Localization Formats Characteristics, localization strategies Dipl.-Übersetzer Daniel Zielinski Dept. 4.6 - Saarland."— Presentation transcript:

1 © eCoLoTrain Software localization Localization Formats Characteristics, localization strategies Dipl.-Übersetzer Daniel Zielinski Dept Saarland University

2 © eCoLoTrain2 Localization Formats: Overview Software: RC files, Borland Delphi, Java, XML,.NET, Visual Basic,.po, XLIFF,... Online help: chm, hlp, rtf Documentation: fm, indd, doc, rtf, … Web pages: xml, html, php, js, pl, … Graphic files: gif, jpg, tiff, psd, …

3 © eCoLoTrain3 Localization Formats: Software Special software formats –RC files –HTML –XML Meta localization formats –XLIFF

4 © eCoLoTrain4 Localization Formats: Document formats in which localization relevant data can be stored Motivation and goal: separation of program code and localization data Programming languages offer different localization formats The differences depend on: –Which data is considered relevant for localization –How is data stored –How placeables and escape sequences are used Data: - Texts - Properties used for representing interfaces in software

5 © eCoLoTrain5 Localization Formats: Challenges External structure –Identification of localizable information –Editing without destroying/corrupting the format Context, scope, programming concepts –Missing context information –Inheritance –Incomplete information –Rules for target files Internal structure –Placeables –Escape sequences –Tags text-based vs. XML-based Binary files vs. source files

6 © eCoLoTrain6 Windows RC Files Standard Windows resource format Localizable information: –Dialogues –Menus –String tables Information: Whereas localizable information from dialogues and menus is stored automatically in the resource files by using software development tools, this is not the case when localizable information comes from error messages and text not contained in dialogues and menus. It is also possible that some error messages are not localized or cannot be localized.

7 © eCoLoTrain7 Windows RC Files: Example IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Info über SimpleSample" FONT 8, "MS Sans Serif" BEGIN ICON IDR_MAINFRAME, IDC_STATIC, 11,17,20,20 LTEXT "SimpleSample Version 1.0", IDC_STATIC,40,10,119,8,SS_NOPREFIX LTEXT "Copyright (C) 2005", IDC_STATIC, 40,25,119,8 DEFPUSHBUTTON "&OK",IDOK,178,7,50,14,WS_GROUP END Exercise: Identify the localizable information

8 © eCoLoTrain8 Windows RC Files: Example IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Info über SimpleSample" FONT 8, "MS Sans Serif" BEGIN ICON IDR_MAINFRAME, IDC_STATIC, 11,17,20,20 LTEXT "SimpleSample Version 1.0", IDC_STATIC,40,10,119,8,SS_NOPREFIX LTEXT "Copyright (C) 2005", IDC_STATIC, 40,25,119,8 DEFPUSHBUTTON "&OK",IDOK,178,7,50,14,WS_GROUP END Localizable elements: -Text - Push buttons

9 © eCoLoTrain9 Windows RC Files: Example IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Info über SimpleSample" FONT 8, "MS Sans Serif" BEGIN ICON IDR_MAINFRAME, IDC_STATIC, 11,17,20,20 LTEXT "SimpleSample Version 1.0", IDC_STATIC,40,10,119,8,SS_NOPREFIX LTEXT "Copyright (C) 2005", IDC_STATIC, 40,25,119,8 DEFPUSHBUTTON "&OK",IDOK,178,7,50,14,WS_GROUP END Localizable elements: - Coordinates - Size specifications - Fonts - Font size

10 © eCoLoTrain10 Windows RC Files: Example IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Info über SimpleSample" FONT 8, "MS Sans Serif" BEGIN ICON IDR_MAINFRAME, IDC_STATIC, 11,17,20,20 LTEXT "SimpleSample Version 1.0", IDC_STATIC,40,10,119,8,SS_NOPREFIX LTEXT "Copyright (C) 2005", IDC_STATIC, 40,25,119,8 DEFPUSHBUTTON "&OK",IDOK,178,7,50,14,WS_GROUP END IDs -Not very intuitive to use -Changes in the source format without having technical support can lead to errors

11 © eCoLoTrain11 Windows RC Files: Tags, escape sequences IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION " Meyer && Söhne " FONT 8, "MS Sans Serif" BEGIN ICON IDR_MAINFRAME, IDC_STATIC, 11,17,20,20 LTEXT "SimpleSample Version 1.0", IDC_STATIC,40,10,119,8,SS_NOPREFIX LTEXT "Copyright (C) 2005", IDC_STATIC, 40,25,119,8 DEFPUSHBUTTON " &OK ",IDOK,178,7,50,14,WS_GROUP END STRING TABLE DISCARDABLE BEGIN AFX_IDS_ERRMSG1 "Die Datei %s enthält %d Worte." AFX_IDS_ERRMSG2 "Die Datei %1 enthält %2 Worte." AFX_IDS_PREVIEW_CLOSE " Beendet die Seitenansicht.\nSeitenansicht beenden" END '&' is a Tag and determines the access key '&' cannot be used for itself '&' => '&&' '&&' is the Escape sequence for '& (but not always, e.g. string tables) Escape sequences for line breaks: '\n' and for '\' is '\\'

12 © eCoLoTrain12 Windows RC Files: Placeables Placeables are substituted with current values during runtime %s and %d are position-sensitive placeables that are used in C and C++ Also '%' needs escape sequence '%' IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Meyer && Söhne" FONT 8, "MS Sans Serif" BEGIN ICON IDR_MAINFRAME, IDC_STATIC, 11,17,20,20 LTEXT "SimpleSample Version 1.0", IDC_STATIC,40,10,119,8,SS_NOPREFIX LTEXT "Copyright (C) 2005", IDC_STATIC, 40,25,119,8 DEFPUSHBUTTON "&OK",IDOK,178,7,50,14,WS_GROUP END STRINGTABLE DISCARDABLE BEGIN AFX_IDS_ERRMSG1 "Die Datei %s enthält %d Worte." AFX_IDS_PREVIEW_CLOSE "Beendet die Seitenansicht.\nSeitenansicht beenden" AFX_IDS_PREVIEW_SIZE "Zoom: %d % " END Problems: Changing the sentence order in the translation can lead to changes in the order of placeables, which can cause program errors Information: In other development environments position- independent placeables are used (%1, %2)

13 © eCoLoTrain13 Windows RC Files: String tables STRINGTABLE DISCARDABLE BEGIN AFX_IDS_SCRESTORE"Stellt das Fenster in seiner normalen Größe wieder her." AFX_IDS_SCTASKLIST"Aktiviert die ""Task-Liste""." AFX_IDS_ERROR"Quelldatei enthält %d Fehler." END STRINGTABLE DISCARDABLE BEGIN AFX_IDS_PREVIEW_CLOSE "Beendet die Seitenansicht.\nSeitenansicht beenden" AFX_IDS_COMPANY_NAME "Meyer && Eriksson" END Double quotes (") are escaped with ("") Line breaks and tabulators are escaped with \n and \t Back slashes are escaped with \\ %d, %s, %1, … are used as placeables % is escaped with % IDs: Connect program code and resources Contain symbolic names of program elements (IDs) and their external identifiers

14 © eCoLoTrain14 Windows RC Files: String tables: Localization Localization without context information Only indication: IDs (additional information in program code) IDs should not be modified Possible insertion of comments in string tables

15 © eCoLoTrain15 Windows RC Files: Localization Flat structure Superposition of controls (tab controls) time-consuming localization

16 © eCoLoTrain16 Windows RC Files: Localization Problems with character sets & fonts –Binary resources saved always as Unicode –Programs can be Unicode- and codepage-based –Representation problems in operating systems that are not Unicode-based (MS Win 9x/ME) Not always localization errors Use of generic fonts Always test in localized target system

17 © eCoLoTrain17 Windows RC Files: Localization

18 © eCoLoTrain Software localization EXERCISE I

19 © eCoLoTrain Software localization HTML HyperText Markup Language

20 © eCoLoTrain20

21 © eCoLoTrain21

22 © eCoLoTrain22

23 © eCoLoTrain23 HTML: Example HTML localization example file HTML localization Example Some text to be localized in the first paragraph. For more information please visit the eCoLoTrain website. A form: Title: Mr. Mrs. Name: Address: Type your address here... Top

24 © eCoLoTrain24 HTML: Example: DTD HTML localization example file HTML localization Example Some text to be localized in the first paragraph. For more information please visit the eCoLoTrain website. A form: Title: Mr. Mrs. Name: Address: Type your address here... Top

25 © eCoLoTrain25 -Character set -Keywords -Description -Style sheets HTML: Example: Header: TITLE, META, LINK HTML localization example file HTML localization Example Some text to be localized in the first paragraph. For more information please visit the eCoLoTrain website. A form: Title: Mr. Mrs. Name: Address: Type your address here... Top HTML localization example file Header

26 © eCoLoTrain26 HTML: Example: Body: H1-6, DIV, P HTML localization example file HTML localization Example Some text to be localized in the first paragraph. For more information please visit the eCoLoTrain website. A form: Title: Mr. Mrs. Name: Address: Type your address here... Top HTML localization Example Some text to be localized in the first paragraph. For more information please visit the eCoLoTrain website. Body -Structure tags

27 © eCoLoTrain27 HTML: Example: A HREF HTML localization example file HTML localization Example Some text to be localized in the first paragraph. For more information please visit the eCoLoTrain website. A form: Title: Mr. Mrs. Name: Address: Type your address here... Top eCoLoTrain website Hyperlinks -Link target -Link title -Link text

28 © eCoLoTrain28 HTML: Example: IMG HTML localization example file HTML localization Example Some text to be localized in the first paragraph. For more information please visit the eCoLoTrain website. A form: Title: Mr. Mrs. Name: Address: Type your address here... Top Graphics -Path -Alt text -Title -Description

29 © eCoLoTrain29 -Caption -Input fields -Selection fields -Check boxes -Text fields -Buttons HTML: Example: FORM, INPUT, TEXTAREA, SELECT HTML localization example file HTML localization Example Some text to be localized in the first paragraph. For more information please visit the eCoLoTrain website. A form: Title: Mr. Mrs. Name: Address: Type your address here... Top A form: Title: Mr. Mrs. Name: Address: Type your address here... Forms

30 © eCoLoTrain30 HTML: Example: Entities Specific characters in HTML have special functions, e.g. brackets indicate tags The following characters have to be escaped in HTML –& with the character string & ("Ampersand") –< with the character string < ("lower than") –> with the character string > ("greater than") Character strings are referred to as HTML entities Entities can be also used to escape special characters: –ä (umlaut) for ä –szlig; for ß –ç for ç Entities

31 © eCoLoTrain31 HTML: Example: CSS body { background-color:#efefef; } div { font-family: arial; font-size: 11px; font-color:#000000; } div.bottom { margin-top:800px; } form { background-color:#ffffff; border-style:solid; border-color:#d7d7d7; border-width:1px; padding:5px; width: 290px; } img { background-color:#d7d7d7; border-style:solid; border-color:#d7d7d7; } Formatting -Font size -Font family -Font colour -Size specification -List formatting list-style-type: decimal lower-roman upper-roman lower-alpha oder lower-latin upper-alpha oder upper-latin disc circle square

32 © eCoLoTrain32 HTML: Example: JavaScript HTML localization example file function chkFormular () { if (document.Hallo.Name.value == "") { alert("Please tell me your name!"); document.Formular.User.focus(); return false; } HTML localization Example A form: Title: Mr. Mrs. Name: Address: Type your address here... Embedded scripts function chkFormular () { if (document.Hallo.Name.value == "") { alert("Please tell me your name!"); document.Formular.User.focus(); return false; }

33 © eCoLoTrain33 HTML: Localization: Challenges Localization of web pages time-consuming Hypertext documents Text, graphics, sound and video files Style sheets Scripts Adaptation of forms Adaptation of design Update Knowledge in different areas needed

34 © eCoLoTrain34 XML Open standard for structured representation of contents and its relations Separation of content and form Structure: + text Free definition of tag names DTDs and schemas for definition of elements, attributes and attribute values Specific characters have to be escaped: > Free structure

35 © eCoLoTrain35 XML: Structure Überschrift Erster Satz. Zweiter Satz. Ein satz im zweiten Absatz. XML Declaration DTD/Schema Description of structure Determination of allowed elements and attributes Elements Opening tags + closing tags Attributes - Attribute names - Attribute values Comments Well-formed XML document: no overlapping tags, all tags closed Valid XML document: Structure corresponds to DTD/ schema

36 © eCoLoTrain36 Heading First sentence. Second sentence. A sentence in the second paragraph. XML: Document view Heading First sentence. Second sentence. A sentence in the second paragraph. document chapter first sentence.. second sentence. a sentencebold. second paragraph paragraph heading

37 © eCoLoTrain37 XML: Data view Info about JavaSample JavaSample 1.0 Copyright (C) 2005 OK resources string id=Dialog.Label1 string id=Dialog.Label2 string id=Dialog.OKButton string id=Dialog.Caption Info about JavaSample JavaSample 1.0Copyright (C) 2005 OK XML as resource format

38 © eCoLoTrain38 XML: Representations Info about JavaSample JavaSample 1.0 Copyright (C) 2005 OK Several possibilities for structuring XML XML as resource format Dialog.Caption Info about JavaSample Dialog.Label1 JavaSample 1.0 Dialog.Label2 Copyright (C) 2005 Dialog.OKButton OK Same information, different structure Texts in attribute fields, empty elements Info about JavaSample JavaSample 1.0 Copyright (C) 2005 OK XML?

39 © eCoLoTrain39 XML: Complex files Cannot open file! Not enough memory to perform operation. Close one or more applications. Do you want to close the application? Wollen Sie die Anwendung schliessen? Soll die Anwendung beendet werden? %1 files have been deleted. %1: Flags %2, Ref %3 DBG: filehandle %1, openflags %2 Datei kann nicht geöffnet werden! Nicht genügend Speicher, um Aktion durchzuführen. Schließen Sie eine oder mehrere Anwendungen. XML as resource format

40 © eCoLoTrain40 XML: Complex Files: Localizable elements Cannot open file! Not enough memory to perform operation. Close one or more applications. Do you want to close the application? Wollen Sie die Anwendung schliessen? Soll die Anwendung beendet werden? %1 files have been deleted. %1: Flags %2, Ref %3 DBG: filehandle %1, openflags %2 Datei kann nicht geöffnet werden! Nicht genügend Speicher, um Aktion durchzuführen. Schließen Sie eine oder mehrere Anwendungen. XML as resource format

41 © eCoLoTrain41 XML: Complex Files: IDs Cannot open file! Not enough memory to perform operation. Close one or more applications. Do you want to close the application? Wollen Sie die Anwendung schliessen? Soll die Anwendung beendet werden? %1 files have been deleted. %1: Flags %2, Ref %3 DBG: filehandle %1, openflags %2 Datei kann nicht geöffnet werden! Nicht genügend Speicher, um Aktion durchzuführen. Schließen Sie eine oder mehrere Anwendungen. Update Alignment XML as resource format

42 © eCoLoTrain42 XML: Complex Files: Bilingual contents Cannot open file! Not enough memory to perform operation. Close one or more applications. Do you want to close the application? Wollen Sie die Anwendung schliessen? Soll die Anwendung beendet werden? %1 files have been deleted. %1: Flags %2, Ref %3 DBG: filehandle %1, openflags %2 Datei kann nicht geöffnet werden! Nicht genügend Speicher, um Aktion durchzuführen. Schließen Sie eine oder mehrere Anwendungen. XML as resource format

43 © eCoLoTrain43 XML: Complex Files: Resource grouping Cannot open file! Not enough memory to perform operation. Close one or more applications. Do you want to close the application? Wollen Sie die Anwendung schliessen? Soll die Anwendung beendet werden? %1 files have been deleted. %1: Flags %2, Ref %3 DBG: filehandle %1, openflags %2 Datei kann nicht geöffnet werden! Nicht genügend Speicher, um Aktion durchzuführen. Schließen Sie eine oder mehrere Anwendungen. XML as resource format

44 © eCoLoTrain44 XML: Complex Files: Meta information Cannot open file! Not enough memory to perform operation. Close one or more applications. Do you want to close the application? Wollen Sie die Anwendung schliessen? Soll die Anwendung beendet werden? %1 files have been deleted. %1: Flags %2, Ref %3 DBG: filehandle %1, openflags %2 Datei kann nicht geöffnet werden! Nicht genügend Speicher, um Aktion durchzuführen. Schließen Sie eine oder mehrere Anwendungen. XML as resource format

45 © eCoLoTrain45 XML: Localization Localization with TMs or software localization tools XML+DTD needed for translation Often complicated localization because of changing structures Difficult to define localizable elements

46 © eCoLoTrain46 Meta localization formats Resource formats which can contain information on different resource formats and additional information Reasons for mixing resource formats: –Parallel use of different development environments => resources in different resource formats (.po) –Minimization of the number of different localization formats in workflow => use of meta formats (XLIFF)

47 © eCoLoTrain47 XLIFF: Context Differences between localization formats: –Structure –Use of character sets –Placeables –Escape sequences –Formatting Relief of localizers Idea of a consistent localization format independent of specific localization tools

48 © eCoLoTrain48 XLIFF XML localization Interchange File Format Open standard XML format Description in form of a SchemaSchema Bilingual approach Most important element contains in the information to be localized and in the translation Possible inclusion of additional information Use as native localization format (e.g. in Macromedia Flash)

49 © eCoLoTrain49 XLIFF &File 08 &Datei &New &Open &Edit &UndoCtrl+Z Notepad Cancel Now Printing &File 08 &Datei 09

50 © eCoLoTrain50 XLIFF: -Element &File 08 &Datei &New &Open &Edit &UndoCtrl+Z Notepad Cancel Now Printing &File 08 &Datei &New &Open &Edit &UndoCtrl+Z Hierarchical structuring defined by -Elements

51 © eCoLoTrain51 XLIFF: Supporting information &File 08 &Datei &New &Open &Edit &UndoCtrl+Z Notepad Cancel Now Printing Notepad Cancel Now Printing

52 © eCoLoTrain52 XLIFF: Alternative translations &Options &Extras 10 &Optionen Copyright XYZ (C) Find 18 Do not translate as Suchen

53 © eCoLoTrain53 XLIFF: Labels &Options &Extras 10 &Optionen Copyright XYZ (C) Find 18 Do not translate as Suchen

54 © eCoLoTrain54 XLIFF: Comments &Options &Extras 10 &Optionen Copyright XYZ (C) Find 18 Do not translate as Suchen

55 © eCoLoTrain55 XLIFF: Workflows Typical localization workflow without XLIFF Source:

56 © eCoLoTrain56 XLIFF: Workflows Localization workflow with XLIFF Source:

57 © eCoLoTrain57 XLIFF: Workflows Automated localization workflow with XLIFF and CAT tools Source:

58 © eCoLoTrain Software localization // Goodbye.php if ($you == tired) { $action = patience; } else { $action = attention; } print Thank you for your $action; exit;


Download ppt "© eCoLoTrain Software localization Localization Formats Characteristics, localization strategies Dipl.-Übersetzer Daniel Zielinski Dept. 4.6 - Saarland."

Similar presentations


Ads by Google