]> git.localhorst.tv Git - alttp.git/blobdiff - app/Models/Technique.php
track twitch category where chats were sent in
[alttp.git] / app / Models / Technique.php
index 0b25e47b19ded74f56c91a8c65a662c1021e2eae..cc94327389a5d3476939c9a830398ee6fb5c3166 100644 (file)
@@ -10,6 +10,11 @@ class Technique extends Model
 {
        use HasFactory;
 
+       public static function locale2lang($locale) {
+               if (strtolower(substr($locale, 0, 2)) == 'de') return 'de';
+               return 'en';
+       }
+
        public function chapters() {
                return $this
                        ->belongsToMany(Technique::class, 'technique_chapter', 'parent_id', 'child_id')