• Resolved TWD

    (@twd)


    I think this plugin is brilliant at what it does.
    Only problem, I can’t use it in Australia.

    Honestly, people will have a REAL problem with us showing the British flag or the USA flag to indicate English. Surely, there must be a way to add a custom flag?

    And any possibility of adding Australia to the defaults?
    It IS a country of almost 30 million people after all …

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author edo888

    (@edo888)

    Hi,

    There is a similar post about changing flags: https://wordpress.org/support/topic/different-flag-for-tamil-sri-lanka/

    This is the flag for Australia for your convenience: https://cdn.gtranslate.net/flags/svg/countries/au.svg

    Thanks! πŸ™‚

    Thread Starter TWD

    (@twd)

    I’m confused. What am I supposed to do with this widget?

    https://gtranslate.io/website-translator-widget

    Plugin Author edo888

    (@edo888)

    Obviously you are going to place the widget code into your website, but first you have to do some modifications to the settings code.

    Thread Starter TWD

    (@twd)

    I’m sorry, but I don’t follow.
    Australia isn’t one of the options in the default GTranslate plugins.
    It doesn’t show as a “language” option, and it doesn’t show as an “alternate flag” option like Canada.

    So how can we use this widget to add Australia to the GTranslate plugin?

    Plugin Author edo888

    (@edo888)

    Looks like you have not read the topic about changing the flag for Tamil language with the flag of Sri Lanka.

    There is no option in the GTranslate plugin settings, so I suggest you to use our widget code instead which gives you more flexibility when it comes to configuring the flags.

    Also, it is common sense that you can change the flag image with another image of your desire and achieve the same, but it will cause headaches in future when we release an update.

    Thanks! πŸ™‚

    Thread Starter TWD

    (@twd)

    “Also, it is common sense that you can change the flag image with another image of your desire and achieve the same, but it will cause headaches in future when we release an update.”

    Exactly. That’s why I am asking for a future proof way of doing this.

    Yes I DID read this: https://wordpress.org/support/topic/different-flag-for-tamil-sri-lanka/

    When I try adding the following script to my website headers as a test … it does nothing.
    So what am I missing?

    <div class="gtranslate_wrapper"></div>
    <script>window.gtranslateSettings = {"default_language":"en","languages":["en","de","it","fy","hi","ta"],"wrapper_selector":".gtranslate_wrapper","alt_flags":{"ta":"https://cdn.gtranslate.net/flags/svg/countries/lk.sv"}}</script>
    <script src="https://cdn.gtranslate.net/widgets/latest/float.js" defer></script>
    Plugin Author edo888

    (@edo888)

    This is from ChatGPT specially for you:

    Me:
    This is the code to change the flag for Tamil language to Sri Lanka:

    <div class="gtranslate_wrapper"></div>
    <script>window.gtranslateSettings = {"default_language":"en","languages":["en","de","it","fy","hi","ta"],"wrapper_selector":".gtranslate_wrapper","alt_flags":{"ta":"https://cdn.gtranslate.net/flags/svg/countries/lk.sv"}}</script>
    <script src="https://cdn.gtranslate.net/widgets/latest/float.js" defer></script>

    Write a similar code to change English language flag with the flag of Australia considering that the flag for Australia is https://cdn.gtranslate.net/flags/svg/countries/au.svg

    ChatGPT:
    To update the English language flag to an Australian flag for the GTranslate widget, you can use a similar structure as the Tamil language example you provided. Here’s how you can modify the code to achieve that:

    <div class="gtranslate_wrapper"></div>
    <script>
    window.gtranslateSettings = {
        "default_language": "en",
        "languages": ["en", "de", "it", "fy", "hi", "ta"],
        "wrapper_selector": ".gtranslate_wrapper",
        "alt_flags": {
            "en": "https://cdn.gtranslate.net/flags/svg/countries/au.svg"
        }
    };
    </script>
    <script src="https://cdn.gtranslate.net/widgets/latest/float.js" defer></script>

    In this code:
    * The alt_flags property has been modified to change the flag for the English (“en”) language to the Australian flag, using the link you specified (https://cdn.gtranslate.net/flags/svg/countries/au.svg).
    * This script should be placed on your website where you want the language selection widget to appear, and it will customize the flag as described.

    • This reply was modified 1 year, 8 months ago by edo888.
    Thread Starter TWD

    (@twd)

    OK. I figured it out.
    By default, using this widget, the language switcher appears in the very bottom left of the rendered page.
    Is there some recommended CSS to get it to stick in the top-left corner of the screen?

    Plugin Author edo888

    (@edo888)

    Hi,

    You can customize the widget look and feel and also position on the widget settings page. When you are happy with how it looks, apply the code change, before placing it on your website.

    Thanks! πŸ™‚

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘How to use Australian Flag?’ is closed to new replies.