Skip to content

Latest commit

 

History

History
30 lines (16 loc) · 967 Bytes

001-internationalization.md

File metadata and controls

30 lines (16 loc) · 967 Bytes

Internalization

The PetClinic Application contains locale files located in src/main/resources/static/resources/messages you can use Copilot to create new translations for the application.

Create a new translation

  1. Create a new file in src/main/resources/static/resources/messages with the name of the locale you want to translate to. For example messages_fr.properties for French.

  2. Use Copilot to translate the file.

Possible Flow
  1. Create a new file for example messages_fr.properties or messages_de.properties
  2. Copy and paste the content from messages.properties into the new file
  3. Select all the content with Ctrl + A (or your mouse)
  4. Press Comment + i, or right click and select Start Inline Chat
  5. Type Translate to French or Translate to German
  6. Let the magic happen!

Note: The application itself does not use these files, they are only used for the exercise.