locked
Support for multiple languages RRS feed

  • General discussion

  • Hi,

    I have a Web application with HTML Client upgraded with March 2014 update.

    I'm using support for multiple languages and runs perfect for entities, but it's not working for validating messages.

    I've created a new project to test this problem and everything works fine, validating messages included.

    What can I check?

    Thanks!

    • Changed type Angie Xu Tuesday, May 13, 2014 3:03 AM it can't be reproduced
    Wednesday, May 7, 2014 8:48 AM

All replies

  • Hi,

    For this issue,  I think you need collect some information, it will determine the source of those kinds of errors, you can check the blog below.

    How to Get a Stack Trace in LightSwitch

    hope it helps.


    • Edited by Juzer1 Monday, May 12, 2014 9:33 AM
    Monday, May 12, 2014 9:32 AM
  • Thanks!

    This afternoon I'll test it.

    In this case, it is not usefull to debug because there aren't errors to look for.

    I'm seeing a message in English when it should be in Italian.

    Tuesday, May 13, 2014 5:46 AM
  • Hi Fernando,

    Which LightSwitch extensions are you using? If you are able to share your project we will take a look and fix it.

    Dave


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

    Tuesday, May 13, 2014 7:57 AM
  • I'm using:

    LightSwitch Cosmopolitan Shell and Theme 1.0

    Microsoft LightSwitch Extensions 1.0

    ComponentOne Studio for LightSwitch HTML

    ComponentOne Scheduler for LightSwitch

    Do i have to update something? I checked Nuget Packages.

    How do you prefer I share the project? I'm using Source Control (TFS) and SQL Server DB.

    Thank you Dave. 

    Tuesday, May 13, 2014 2:05 PM
  • Hi Fernando,

    Can you clarify if it fails in debug locally or when deployed.

    Zip the latest from TFS (or give readonly access VSOnline) and script the database schema would be handy (no data required).

    Cheers

    Dave


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

    Tuesday, May 13, 2014 2:13 PM
  • Could you send me your email at

    fernando.mugarra

    @fiorentini.com?

    Tomorrow I'll continue with this.

    Tuesday, May 13, 2014 3:01 PM
  • Ok, I am having trouble with firewalls and blocking code snippets so I will post here...

    Hi Fernando,

    I think the best way forward is to clean-up the language support across all the projects in the solution. Then it will most likely work!

    Web.config in the Server project has:

        <add key="ApplicationCulture" value="es" />
        <add key="SupportedCultures" value="de,en,en-GB,en-US,es,it" />
    

    resources.js auto-generated in the HTMLCSS project has:

    window["__msls_defaultLanguage"] = "es";
    window["__msls_supportedLanguages"] = "de;en;en-GB;en-US;es;it";
    

    And at run-time in the HTML client it shows this:

    languages = [DE,EN,EN-GB,EN-US,ES,IT]

    I think that you must add resource files and settings that match across all the projects otherwise there are mismatches and problems. It is working here for me using ‘en-GB’ with local changes (and showing ‘es’ defaults from msls resources).

    Give that a try and get back with the results.

    Thanks

    Dave


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

    Wednesday, May 14, 2014 9:57 AM
  • Thank you!

    We are very near, now the message is in Spanish, but the title is in Italian.

    On Web.config I "EN-US" style="background:white;color:blue;font-family:Consolas;"><add key="ApplicationCulture" value="es" />

    <add key="SupportedCultures" value="es" />

    How I can restart The file resources.js ?

    Is always the same

    window["__msls_defaultLanguage"] = "es";
    window["__msls_supportedLanguages"] = "de;en;en-US;es;it";

    Wednesday, May 14, 2014 11:31 AM
  • Did you create a 'client.lang-es.resjon'?

    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

    Wednesday, May 14, 2014 11:38 AM
  • I've copied one and changed the name, I can't create resjon files like we talk in this thread: Missing Resources File (.resjson) (I can't copy links)

    When I added this file, it returned to show the wrong language.

    Always publising in Spanish:

    If I left just "client.lang-es.resjon", the message and the title is in Spanish.

    If I have  "client.lang-es.resjon" and  "client.lang-IT.resjon", the message is in Spanish and the title in Italian.

    If I have "client.lang-es.resjon", "client.lang-IT.resjon" and "client.lang-en-US.resjon", the message is in English and the title in Italian.

    Wednesday, May 14, 2014 1:11 PM
  • In the Server project the default resx file 'Service.resx' contains Italian so does not match the default language 'es'.

    Is that still the case?

    Dave


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

    Wednesday, May 14, 2014 1:30 PM
  • Yes.

    I've corrected that, but now the entity fields are in Italian, message title in italian, and message in Spanish. (Publishing in Spanish)

    Web.config:

    <add key="ApplicationCulture" value="es" />
    <add key="SupportedCultures" value="es,it" />

    resources.js:

    window["__msls_defaultLanguage"] = "es";
    window["__msls_supportedLanguages"] = "en;en-US;es;it";

    Wednesday, May 14, 2014 2:14 PM