franz159 wrote: 
> I created a file "it.json" with italian translation of strings.
> I uploaded the file in the html/lang directory
> > 
Code:
--------------------
  >   > 
/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/MaterialSkin/HTML/material/html/lang
 $ ls -l it.json 
  > -rwxr-xr-x 1 squeezeboxserver nogroup 17297 Oct 30 23:56 it.json
  > 
pi@moodeStdl:/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/MaterialSkin/HTML/material/html/lang
 $
--------------------
> > 
> But is deos not seem to work when setting the language to Italian in
> LMS.
> Could you please advise which "language code" I should use for
> Italian?
> I tried both
> IT.JSON
> and
> IT-IT.JSON
> 
> Thanks
> franz

Material first queries LMS for its language setting. If you run Material
in a desktop browser, open your browser's developer tools, go to the
network tab, you should see lots of calls to -jsonrpc.js-. One of these
will have smething like
-{"method":"slim.request","params":["",["pref","language","?"]],"id":1,"result":{"_p2":"EN"}}-
The language returned here is -EN-. When Material detects -EN- it then
queries the browser's settings to determine if its should use american
english or british english. That doesn't affect you, but the
-jsonrpc.js- response should let you know what to use as the filename
(Material converts it to lowercase).

If you can use curl from a command line, you could just call:

Code:
--------------------
    
  curl 'http://localhost:9000/jsonrpc.js' --data-binary 
'{"id":1,"method":"slim.request","params":["",["pref","language","?"]]}'
  
--------------------


Does that help?


------------------------------------------------------------------------
cpd73's Profile: http://forums.slimdevices.com/member.php?userid=66686
View this thread: http://forums.slimdevices.com/showthread.php?t=109624

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to