Default Language

Is there a way to only have one language or to always default to one language and logging in ?

Comments

  • Yes
    Edit:
    /usr/local/CyberCP/loginSystem/views.py
    except:
    request.session[LANGUAGE_SESSION_KEY] = "en"
    request.COOKIES['django_language'] = "en"
    settings.LANGUAGE_CODE = "en"
    Change to:
    except:
    request.session[LANGUAGE_SESSION_KEY] = "xx"
    request.COOKIES['django_language'] = "xx"
    settings.LANGUAGE_CODE = "xx"

    Edit:
    /usr/local/CyberCP/CyberCP/settings.py
    LANGUAGE_CODE = 'en'

    TIME_ZONE = 'UTC'

    USE_I18N = True

    USE_L10N = True

    USE_TZ = True

    Change to:
    LANGUAGE_CODE = 'xx'

    TIME_ZONE = 'UTC'

    USE_I18N = True

    USE_L10N = True

    USE_TZ = True

    And reboot
  • would it be overwritten in a future update ?
  • Yes
    Ask CyberPanel employees and programmers whether they will add the option to change the default language.
  • Default is english if you don't choose anything from dropdown.
  • Default is english if you don't choose anything from dropdown.

    I wrote how to change to a different default language.
    Currently, if something is missing in the translation, it is replaced by the Chinese language.
  • Nencio said:

    Default is english if you don't choose anything from dropdown.

    I wrote how to change to a different default language.
    Currently, if something is missing in the translation, it is replaced by the Chinese language.
    For some translation or default selection? (Or even if English is selected)
  • edited August 8
    Yes
    msgid "Paste Your Key"
    msgstr ""

    There are also shortages in translation. You can not do part of the translation. For example, the login (login.html) can not be translated in django.po, etc.
  • Thank you, I will check.
  • edited August 8
    I found also:
    #: NEW
    #: CyberCP/websiteFunctions/templates/websiteFunctions/website.html:693
    msgid "Click"
    msgstr ""

    #: NEW
    #: CyberCP/websiteFunctions/templates/websiteFunctions/website.html:693
    msgid " to read more about whats changed in"
    msgstr ""

    #: NEW
    #: CyberCP/websiteFunctions/templates/websiteFunctions/website.html:693
    msgid "from v1.7 onwards."
    msgstr ""

    #: NEW
    #: CyberCP/websiteFunctions/templates/websiteFunctions/website.html:606
    msgid "Paste Your Cert"
    msgstr ""

    #: NEW
    #: CyberCP/websiteFunctions/templates/websiteFunctions/website.html:609
    msgid "Paste Your Key"
    msgstr ""

    You could do * .pot or English * .po, * mo. To have a basis for translation.
    Where are the translation files for a new language given?
  • Yes, there is some new text due to upgrades, I will update same files with new text and push to GitHub.
  • How do I finish the translation to whom should I pass it on?
  • Nencio said:

    How do I finish the translation to whom should I pass it on?

    You can create the pull request on Github.
Sign In or Register to comment.
Support CyberPanel CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!