DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

How to change language selector text

Sort:
You are not authorized to post a reply.
Page 1 of 212 > >>





New Around Here





    Trying to change the selector text

    English (United States)
    Português (Portugal)
    Français (France)
    العربية (مصر)

    and shorten choice of language section. e.g. ENG, PORT, FR, etc






    Veteran Member





      Sequii,

      this is not really complicated: in the skin file you find something like

         {dnn:language id="dnnLanguage" runat="server" showlinks="True" showmenu="False" /}
      
      

      Replace this by

         {dnn:LANGUAGE runat="server"
            ID="dnnLanguage"
            ShowLinks="True"
            ShowMenu="False"
            ItemTemplate='{a href="[URL]" title="[CULTURE:NATIVENAME]"}{span class="Language" style="text-transform: uppercase;"}[CULTURE:THREELETTERISOCODE]{/span}{/a}'
            AlternateTemplate='{a href="[URL]" title="[CULTURE:NATIVENAME]"}{span class="Language" style="text-transform: uppercase;"}[CULTURE:THREELETTERISOCODE]{/span}{/a}'
            SelectedItemTemplate='{span class="Language selected" title="[CULTURE:NATIVENAME]" style="text-transform: uppercase;"}[CULTURE:THREELETTERISOCODE]{/span}'
         /}
      
      

      Replace { by < and } by >. Find more info here: https://www.dnnsoftware.c...language-skin-object

      Happy DNNing!
      Michael

      Michael Tobisch
      DNN★MVP

      dnnWerk Austria
      DNN Connect





      New Around Here





        Hello Michael,

        I applied those settings and the site theme looses the css and doesnt change the menu so i started to break this up some.
        When applying just these setting nothing changes either.
        https://drive.google.com/...fcbgM0ewefFom_ZdJWts
        ^ Image of .ascx file.

        {dnn:language id="dnnLanguage" runat="server" showlinks="True" showmenu="False"
        ItemTemplate='{a href="[URL]" title="[CULTURE:NATIVENAME]"}{span class="Language" style="text-transform: uppercase;"}[CULTURE:THREELETTERISOCODE]{/span}{/a}'/}

        https://www.dnnsoftware.c...skinobject-explained
        Read this and when chaging some of this code do see the site take.
        I'm using inner.ascx those are my sub pages on nxa.org.
        Tried clearing cache.

        Just cant get this to work. Thanks for the help.






        Veteran Member





          Please note that you shoudl also add an "AlternateTemplate".
          I think I would use:

          < dnn:LANGUAGE runat="server"
          id="dnnLANGUAGE"
          showMenu="False"
          showLinks="True"
          ItemTemplate='< a href="[URL]" class="Language [CULTURE:THREELETTERISOCODE]" title="[CULTURE:NATIVENAME]">[CULTURE:THREELETTERISOCODE]< /a>'
          AlternateTemplate='< a href="[URL]" class="Language [CULTURE:THREELETTERISOCODE]" title="[CULTURE:NATIVENAME]">[CULTURE:THREELETTERISOCODE]< /a>'
          SelectedItemTemplate ='< a href="[URL]" class="Language [CULTURE:THREELETTERISOCODE] Selected" title="[CULTURE:NATIVENAME]">[CULTURE:THREELETTERISOCODE]< /a>'
          />






          New Around Here





            hi again.

            This shows what my site looks like after applying.
            https://drive.google.com/...r9joTd_5scAXx-A2fiuz

            Just want it to look like 
            https://drive.google.com/...25FKnl7K95oCa6L8MSRf






            Veteran Member





              Posted By sequii on 18 Feb 2020 01:05 PM

              hi again.

              This shows what my site looks like after applying.
              https://drive.google.com/...r9joTd_5scAXx-A2fiuz

              Just want it to look like 
              https://drive.google.com/...25FKnl7K95oCa6L8MSRf

              please first the remove the spaces I added to circomvent the forum editor (< a)
              Also make sure the html you past in your skin is not encoded.

               

               






              New Around Here





                Thanks for the help.

                http://nxa.org/en-us/About/Mission
                top right corner

                engporfraara

                The scope was to have the drop down selector for langauges display
                eng
                por
                fra
                ara

                Right now they are just links. If I showlinks to false it shows the regular english titles.






                Veteran Member





                  In this case you should try:

                  ShowLinks="False"
                  ShowMenu="True"
                  

                  as attributes of the menu control.

                  Happy DNNing!
                  Michael

                  Michael Tobisch
                  DNN★MVP

                  dnnWerk Austria
                  DNN Connect





                  Veteran Member





                    Posted By sequii on 20 Feb 2020 04:16 PM

                    Thanks for the help.

                    http://nxa.org/en-us/About/Mission
                    top right corner

                    engporfraara

                    The scope was to have the drop down selector for langauges display
                    eng
                    por
                    fra
                    ara

                    Right now they are just links. If I showlinks to false it shows the regular english titles.

                    AFAIK there's no drop-in solution for that. You would have to use render a ul (change the template) and add some CSS

                     

                     






                    New Around Here





                      Thanks Michael but yes when i do that it just shows the full langauge on the selector.

                      You are not authorized to post a reply.
                      Page 1 of 212 > >>

                      These Forums are dedicated to the discussion of DNN Platform.

                      For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                      1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                      2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                      3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                      4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                      5. No Flaming or Trolling.
                      6. No Profanity, Racism, or Prejudice.
                      7. Site Moderators have the final word on approving / removing a thread or post or comment.
                      8. English language posting only, please.

                      Would you like to help us?

                      Awesome! Simply post in the forums using the link below and we'll get you started.

                      Get Involved