Jump to content

Help First Emby Plugin Development Issues


Recommended Posts

Posted

Hi,

How would I actually inherit the language on my plugin?  So for instance my plugin creates libraries that are prefixed with "Because you watched".  How would i just have those display in whatever language is selected by the user?

Posted
31 minutes ago, bwarthen said:

Hi,

How would I actually inherit the language on my plugin?  So for instance my plugin creates libraries that are prefixed with "Because you watched".  How would i just have those display in whatever language is selected by the user?

HI ,currently this is not possible. Items in the database only have one title value.

mickle026
Posted

There's language and country code.

I am not sure where to get these outside of a metadata provider, but you can. 

string CountryCode = info.MetadataCountryCode;
string Language = info.MetadataLanguage;
string CultureString = Language + "-" + CountryCode;

So you can create your own translation engine if you wish, but there is already one inside emby (like a word swap engine)

There is also some plugins in the sdk (I think) that show you how to use the "i18n" conversions.  I have not done this so cannot really advise.

so you can display "Because you watched" as "Parce que tu as regardé" if the code is french, you have to create a translation file also though.

Look at jelums code here

https://github.com/luzmane/emby.movie.auto.merge

Jelum has implimented it inside that plugin.

Posted (edited)

Removed 

 

 

Edited by bwarthen
answered already
Posted

Thanks mickle026  That is exactly what I needed.  

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...