Results 1 to 9 of 9

Thread: Multilingual Data in Custom Module

  1. #1
    lenz1979 is offline Sugar Community Member
    Join Date
    Jun 2009
    Posts
    68

    Default Multilingual Data in Custom Module

    Hello!

    I want to create a custom module where people can insert "Locations".

    All the locations will be shown in a list on the Webseite. (Website will directly fetch the content from the Database)

    Now the website is multilingual and also the "Locations" should be in more languages.

    if someone enters a new location in the CRM some of the descriptive Fields (Textfields) should be entered in more languages.

    Did someone of you already make multilingual content. ?

    Maybe an overlay table for the custom module to store the different content of the textfields for the other languages?

    Maybe there already exist some solutions for sugar.

    regards

  2. #2
    sts's Avatar
    sts
    sts is offline Sugar Community Member
    Join Date
    Aug 2010
    Posts
    978

    Default Re: Multilingual Data in Custom Module

    Should it be possible to set texts in let's say 2 or 3 predifined languages, or should the solution be more flexible?
    Stefan Ulrich Sauer
    System Analyst

    Devoteam Danet GmbH
    Gutenbergstraße 10
    D-64331 Weiterstadt
    Germany
    email: Stefan-Ulrich.Sauer@devoteam.com
    http://www.devoteam.de

  3. #3
    sts's Avatar
    sts
    sts is offline Sugar Community Member
    Join Date
    Aug 2010
    Posts
    978

    Default Re: Multilingual Data in Custom Module

    If it's only for some fields in very few languages I'd do it this way:

    For each field that should be set in different languages I'd create a set of custom fields <fieldname>_<language_c, e.g. description_en_us_c, description_de_DE_c, etc. I'd place these fields together in EditView so the user is able to set the values. In the external application the sql statement then must use the fields with the language extension as needed.
    Stefan Ulrich Sauer
    System Analyst

    Devoteam Danet GmbH
    Gutenbergstraße 10
    D-64331 Weiterstadt
    Germany
    email: Stefan-Ulrich.Sauer@devoteam.com
    http://www.devoteam.de

  4. #4
    rafael.q.g@hotmail.com's Avatar
    rafael.q.g@hotmail.com is offline Sugar Community Member
    Join Date
    Jun 2011
    Location
    Florianópolis - Brazil
    Posts
    782

    Default Re: Multilingual Data in Custom Module

    A good solution is to use the deafult multi-language support.
    First install the language pack of your desired languages (Just for sugar let these languages available on languages dropdown). If you do not want to translate all modules just this custom one, create your own language pack, with an empty content.

    After that, you can use studio to translate the terms for each language or do it manually configurating the files under the language folder of your module.

    Doing it from studio you can open your module and for each field label you can select the language in a dropdown field and then enter the value. Do that for all desired languages.

    The users can select their languages on login, there is a dropdown below the password field. They will see the module labels according with the selected language.
    Rafael Queiroz Gonçalves
    Advanced OMG UML Certified Professional
    Sun Certified Enterprise Architect for the Java Platform
    Sun Certified Programmer for the Java 2 Platform
    IBM Certified Advanced Application Developer - Lotus Notes and Domino
    IBM Certified Application Developer - IBM WebSphere Portlet Factory
    Computer Science Mastering / UFSC - PPGCC

  5. #5
    lenz1979 is offline Sugar Community Member
    Join Date
    Jun 2009
    Posts
    68

    Default Re: Multilingual Data in Custom Module

    i think flexible becaue at the moment there are 4 languages but maybe in future more others ( So cusotm fields for each language are not a solution)

  6. #6
    sts's Avatar
    sts
    sts is offline Sugar Community Member
    Join Date
    Aug 2010
    Posts
    978

    Default Re: Multilingual Data in Custom Module

    Rafael,

    lenz1979 wants to show translations for the CONTENTS of some of the module fields in an external web application selecting data from Sugar database. Your solution is for labels inside Sugar only.
    Stefan Ulrich Sauer
    System Analyst

    Devoteam Danet GmbH
    Gutenbergstraße 10
    D-64331 Weiterstadt
    Germany
    email: Stefan-Ulrich.Sauer@devoteam.com
    http://www.devoteam.de

  7. #7
    lenz1979 is offline Sugar Community Member
    Join Date
    Jun 2009
    Posts
    68

    Default Re: Multilingual Data in Custom Module

    @rafael.

    no i do not need the labels within sugar multilingual.

    The users should enter data in multilingual versions within my custom module.

    do a user inserts a new Data-row for "Location Paris" he enters e description for that Location that is default language english. Then he wants to enter the description field also in spanish and German....

    Stefan is right.... functionality from a CMS System...

    regards

  8. #8
    rafael.q.g@hotmail.com's Avatar
    rafael.q.g@hotmail.com is offline Sugar Community Member
    Join Date
    Jun 2011
    Location
    Florianópolis - Brazil
    Posts
    782

    Default Re: Multilingual Data in Custom Module

    OK, thank you sts for your clearify.
    In this case is needed to implement a new solution (or find a existing one if you have luck ).

    If I have to implement that I will create a table on sugar database (probably using a hidden module just for that) that had at least the following columns: Language key, field name, module , content.

    This way the fields which needs to de translated will have to be displayed using a function that will lookup the field content according with user language. To store field value you also have to check the appropprited language, and it will need to be done via logic_hook, once the field content will be saved in a external module.

    You also have to use some mechanism to config the used language, then maybe in this case the deafult sugar mechanism could still be valid.
    Rafael Queiroz Gonçalves
    Advanced OMG UML Certified Professional
    Sun Certified Enterprise Architect for the Java Platform
    Sun Certified Programmer for the Java 2 Platform
    IBM Certified Advanced Application Developer - Lotus Notes and Domino
    IBM Certified Application Developer - IBM WebSphere Portlet Factory
    Computer Science Mastering / UFSC - PPGCC

  9. #9
    sts's Avatar
    sts
    sts is offline Sugar Community Member
    Join Date
    Aug 2010
    Posts
    978

    Default Re: Multilingual Data in Custom Module

    I think there could be a new module for translations with fields 'name' for the text and 'language' (a drop down with all the languages currently supported - where new languages can be added easily) plus maybe more additional fields if needed.
    With a one-to-many relation between your module and this new module the user could add new descriptions and set the language flag.
    Stefan Ulrich Sauer
    System Analyst

    Devoteam Danet GmbH
    Gutenbergstraße 10
    D-64331 Weiterstadt
    Germany
    email: Stefan-Ulrich.Sauer@devoteam.com
    http://www.devoteam.de

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 2010-06-11, 05:32 PM
  2. Multilingual Working Surface for International Companies
    By sanktusm in forum Feature Requests
    Replies: 3
    Last Post: 2010-01-17, 04:20 PM
  3. Replies: 0
    Last Post: 2009-09-17, 12:40 PM
  4. Importing data to a custom module
    By chrishughes in forum Help
    Replies: 0
    Last Post: 2009-06-30, 01:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •