Tipi di file supportati (Strings)

.XML - Java Properties (Strings)

Contenuti tradotti automaticamente dall'inglese con Phrase Language AI.

Estensioni dei file 

.xml

Estensione API 

properties_xml

Importa 

Esporta 

Supporto forme plurali 

No

Supporto descrizione 

Java Properties XML è l'equivalente XML del file Java Properties. Le chiavi di un file Java Properties esistono come attributo dell'elemento entry nell'XML, mentre i valori sono stringhe di testo in linea annidate all'interno dei tag entry. Rispetto ai file Java Properties standard, il tipo XML offre maggiore flessibilità in quanto puoi aggiungere più attributi all'elemento entry. Ad esempio, puoi decidere che solo le chiavi con un attributo class='translatable' vengano selezionate per la traduzione.

Campione di codice

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
  <entry key="boolean_key">--- true
</entry>
  <entry key="empty_string_translation"/>
  <entry key="key_with_description">Controllalo! Questa chiave ha una descrizione! (Almeno in alcuni formati)</entry>
  <entry key="key_with_line-break">Questa traduzione contiene
un'interruzione di riga.</entry>
  <entry key="nested.deeply.key">Wow, questa chiave è annidata ancora più in profondità.</entry>
  <entry key="nested.key">Questa chiave è annidata all'interno di uno spazio dei nomi.</entry>
  <entry key="null_translation"/>
  <entry one="Trovata solo una pluralizzazione." other="Wow, hai %s pluralizzazioni!" zero="Non hai pluralizzazione." key="pluralized_key"/>
  <entry key="sample_collection">---
- first item
- second item
- third item
</entry>
  <entry key="simple_key">Chiave semplice, messaggio semplice, così semplice.</entry>
  <entry key="unverified_key">Questa traduzione non è ancora verificata e aspetta di esserlo. (In alcuni formati esportiamo anche lo stato)</voce>
</properties>
Questo articolo ti è stato utile?

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.