This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Titel", | |
"body": { | |
"paragraph": "Dies ist ein Paragraph." | |
}, | |
"users": { | |
"form": { | |
"submit": "Speichern" | |
}, | |
"salutation": "Hallo {{name}}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Titel", | |
"body.paragraph": "Dies ist ein Paragraph.", | |
"users.form.submit": "Speichern", | |
"users.salutation": "Hallo {{name}}" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Title","Description","en","pl","de" | |
"settings","General Settings","Settings","Ustawienia","Einstellungen" | |
"has_placeholders","This example shows the usage of placeholders","Hello {username}","Cześć {username}","Hallo {username}" | |
"quotes","Quotes in content","Hello ""LingoHub""","Cześć ""LingoHub""","Hallo ""LingoHub""" | |
"linebreaks","an example for linebreaks","Here is a | |
linebreak","Oto | |
nowa linea","Hier ist ein | |
Zeilenumbruch" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<resources> | |
<string name="deutscher string">actually german: muss grösser gleich %d sein</string> | |
<string name="escaped quotes">Logged in as \"%s\"</string> | |
<string name="escaped single quotes">Logged in as \'%s\'</string> | |
<string name="surrounded quotes">"Logged in as '%s'"</string> | |
<string name="surrounded quotes escaped">"Logged in as \'%s\'"</string> | |
<!-- single line comment --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this comment will be parsed as header comment | |
"In a typical strings file the key is the text of the target language"="the value holds the translated text"; | |
// an alternative is to use generic keys | |
"page.main.title"="Titel der Hauptseite"; | |
/* comments in .strings files | |
can be multi line, | |
single line */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this comment will be interpreted as header comment | |
# the value can continue to the next line if the previous line ends with a backslash | |
welcome_message = Welcome back, \ | |
we have missed you | |
# multi line comments belong to the next key value pair | |
# as long as they are not interrupted by a white line | |
visit_count = this is your {visit} visit to our site |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this comment is ignored because it is not directly followed by a key-value pair | |
en: | |
# this comment is also ignored, | |
# because it is followed by a key that has children nodes | |
header: | |
hello_user : Hello %{username} | |
# comments are treated as translation descriptions | |
# belonging to the key-value pair that follows | |
# lingochecks as well | |
# lh-check {placeholders:true, terms: Lingohub, min: -5, max:+5} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* will try to convert the given chars to a valid string. | |
* will check for every valid conversion if the given {@link ContentCheck} is valid, if not | |
* it will continue with the next encoding | |
* | |
* @param chars | |
* characters in an unknown charset | |
* @param check | |
* this instance will be called for every valid conversion | |
* @return the chars converted to a String decoded by the first matching {@link Charset} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static java.nio.charset.StandardCharsets.ISO_8859_1; | |
import static java.nio.charset.StandardCharsets.UTF_16BE; | |
import static java.nio.charset.StandardCharsets.UTF_16LE; | |
import static java.nio.charset.StandardCharsets.UTF_8; | |
import java.nio.ByteBuffer; | |
import java.nio.CharBuffer; | |
import java.nio.charset.CharacterCodingException; | |
import java.nio.charset.Charset; | |
import java.nio.charset.CharsetDecoder; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lingohub resource:up config/locales/en/en.yml --locale 'en' --project 'lht' | |
lingohub resource:up config/locales/de/de.yml --locale 'de' --project 'lht' | |
lingohub resource:up config/locales/ja/ja.yml --locale 'ja' --project 'lht' |