Coming soon: Your brand new Help Center & Community! Get a sneak-peek here

Language-dependent custom labels

Hello world!

I am messing around with an edit of the contactPreview (minicard that comes up when you search for a contact in SuperOffice WEB) to edit/include more information in this window.
I have made my own ContactPreviewPlugin that basically overrides the default PreviewData and replaces it with my own. 

I have created some custom labels, following the guidelines in the SDK, and created my own Resources-file and included 3x .resx-files (default, norwegian and english). 
This works, but i get 3 different .dll's that needs to be put in the correct folder (..\SO_WEB\bin for default,  ..\SO_WEB\bin\no for Norwegian, ..\SO_WEB\bin\en-us for English). 

Is there any way to create only 1 .resx-file that contians all the languages?  Lets say i want to have it usable on all languages, then i would have to edit/insert 15 different .dll's into the different language-folders in SuperOffice. 
To my understanding i can include all my label-names for Norwegian in the same .resx (if i have multiple custom labels i want to use), but i would rather have it 'the other way around' with 1 file containing all the language-variations of the same label. 

Any suggestions on how to achieve this?


//Eivind

 

RE: Language-dependent custom labels

Hi Eivind,

You would need to create a class that implements the SuperOffice.Globalization.IResourceProvider interface and do all of the GetResource("name") resolution yourself. 

Best regards.

Af: Tony Yates 17. mar 2017

RE: Language-dependent custom labels

Hey Tony

Thanks for the quick response :)

I figured out that SuperOffice includes my custom label in Admin (settings -> labels), so i can just include my custom label backend and then insert all my language-variations there: 


This will suffice for my scenario, but i will do some testing on what you suggested, so i know how this is done in the future.

best regards, 
Eivind
 

Af: Eivind Johan Fasting 17. mar 2017

RE: Language-dependent custom labels

Ehm.. I made a Resource archive provider as a custom archive exercise.
I believe you need the individual language specific .dll in every culture directory for the lable to show up in any particular language.
May be I misunderstand. I get the feeling you only want to deploy 1 culture .dll and then expect to be able to add ResourceOverrides in the db for all cultures.
I don't think it works that way. Perhaps you will prove me wrong though!

Conrad

Af: Conrad Weyns 17. mar 2017

RE: Language-dependent custom labels

Hello, 

I have only included my Resources.dll in ..\SO_WEB\Bin, which contains default name for the label. The other variations/languages are added through Admin (as described previously). This works like a charm :)

It's much simpler to add default.dll and adjust/include language-variations(cultures) through admin instead of placing .dll's in each subfolder (in bin). This is also a much more flexible setup that can be administered by the SuperUser from this point on. 

Examples:


//Eivind
 

Af: Eivind Johan Fasting 3. apr 2017