Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Multilingual

Empfohlene Antworten

hi leute,

also ich soll ein bestehendes projekt multilungual erweitern.... aber nicht indem ich alles neu abtippe oder so... deswegen stellt sich bei mir jetzt die frage, wie das gehen soll :confused: ... angeblich per XML, aber ich bin da überfragt!

hoffe dass ihr mir weiterhelfen könnt

gruß

marna

Da hast du Glück, dass du es mit Java zu tun hast....

Es gibt eine Klasse ResourceBundle und sog. Property-Dateien (*.properties). Über eine Kombination der beiden kannst du multilinguale Applikationen erstellen.

Kleine Einführung:

Für jede Sprache gibt es eine eigene Property-Datei. z.B. MyProperty.properties als default; MyProperties_de.properties für deutsch etc.

Über die Klasse ResourceBundle wird abhängig von der OS-Einstellung das entsprechende Property-File geladen.

In dem Prop-File hast du Key-Value Einträge. Im Quellcode beziehst du dich nur noch auf den Key und ordnest den Value z.B. einem JLabel zu.

Hoffe es hat ein wenig geholfen.

Gruß

Snowghost

Einen sehr guter, englischer Artikel aus der JavaWorld findest du hier . Er ist mehrere Seiten lang und umfasst mehrere Teile.

In deutsch findest du es im Java Buch in Kapitel "17.4 Internationalisierung und Lokalisierung". Du musst dir das Buch herunterladen und auspacken, online gibt's das meines Wissens nicht zu lesen.

Gruß

Florian

danke euch beiden.... hat mir wirklich schon etwas weitergeholfen

gruß

marna

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.