Help Translating

SamBrishes edited this page Nov 15, 2018 · 1 revision

Help Translation

Version LastUpdate

It would be really awesome to offer tail.DateTime in many different languages! So you're really Welcome to translate tail.DateTime in your (native) language, but don't worry there are just a few strings.

Each translator is immortalized in the README file (as well as in the CHANGELOG file), gladly with link to your website too!

Thanks to every translator!

How To Translate

You can translate tail.DateTime by creating a new Issue or a complete Fork. Both methods requires a language code, which you can find here.

Create a new Issue

Create a new Issue with the topic named "Translation: {lang_code}" and the follwing content (replace the "Your Translation" text below with the respective translated text ;D).

### Months
-   January: "Your Translation"
-   February: "Your Translation"
-   March: "Your Translation"
-   April: "Your Translation"
-   May: "Your Translation"
-   June: "Your Translation"
-   July: "Your Translation"
-   August: "Your Translation"
-   September: "Your Translation"
-   October: "Your Translation"
-   November: "Your Translation"
-   December: "Your Translation"

### Weeks
-   Sunday (SUN): "Your Translation (CODE)"
-   Monday (MON): "Your Translation (CODE)"
-   Tuesday (TUE): "Your Translation (CODE)"
-   Wednesday (WED): "Your Translation (CODE)"
-   Thursday (THU): "Your Translation (CODE)"
-   Friday (FRI): "Your Translation (CODE)"
-   Saturday (SAT): "Your Translation (CODE)"

### Time
-   Hours: "Your Translation"
-   Minutes: "Your Translation"
-   Seconds: "Your Translation"

### Strings
-   Select a Month: "Your Translation"
-   Select a Year: "Your Translation"
-   Select a Decade: "Your Translation"
-   Select a Time: "Your Translation"

Create a new Fork

You can also fork this repository to your Account and create a new file within the langs folder with the following name: tail.datetime-{lang_code}.js. Paste the following code in this file and translate the strings into your language. After you have done this you can create a new Pull Request, and after a short check, this gets also released by us!

German Example:

;(function(factory){
   if(typeof(define) == "function" && define.amd){
       define(function(){
           return function(datetime){ factory(datetime); };
       });
   } else {
       if(typeof(window.tail) != "undefined" && window.tail.DateTime){
           factory(window.tail.DateTime);
       }
   }
}(function(datetime){
    datetime.strings.register("de", {
        months: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
        days:   ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
        shorts: ["SO", "MO", "DI", "MI", "DO", "FR", "SA"],
        time:   ["Stunden", "Minuten", "Sekunden"],
        header: ["Wähle einen Monat", "Wähle ein Jahr", "Wähle ein Jahrzehnt", "Wähle eine Uhrzeit"]
    });
    return datetime;
}));

Thanks!

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.