HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

how should I give filename with translation?

how should I give filename with translation for this plugin for russian language?
i try ru_RU.php, vf_ru.php, RU.php
but i doesn't work

Comments

  • It should be exactly the country code of your locale, which is also the name of the folder in the /locale directory.

    /plugins/Timeago/locale/vf_ru.php
    or
    /plugins/Timeago/locale/vf_ru_PETR1708.php

    should work, depending on which locale you are using.

    You may also need to clear the .ini files in your cache folder or diable/reenable the plugin for the new translation to take effect.

  • doesn't work =( I use vf_ru locale and name the file for your plugin /plugins/timeago/locale/vf_ru.php and I del all ini files, but I see only english version of your plugin texts

  • peregrineperegrine MVP
    edited November 2014

    Actually things have changed a bit in locales, and it is a bit of a moving goal post. as far as naming conventions. but ... in vanilla 2.1.5

    it depends on the specific version of the locale you are using.

    for this:

    http://vanillaforums.org/addon/vf_ru__petr1708-locale/definitions.php

    it would be:

    /plugins/timeago/locale/ru.php

    for more info see:

    http://vanillaforums.org/discussion/comment/218647/#Comment_218647

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • http://vanillaforums.org/addon/vf_ru__petr1708-locale/definitions.php
    this is not actual russian locale this is "joke"-translation (old style russian 1708 year)

  • peregrineperegrine MVP
    edited November 2014

    @m_maksim said:
    http://vanillaforums.org/addon/vf_ru__petr1708-locale/definitions.php
    this is not actual russian locale this is "joke"-translation (old style russian 1708 year)

    the joke was on me, and went over my head.

    but the method of finding out what to name locale in a plugin is the same regardless of your translation.

    I assume you solved your issue despite the joke.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • AnonymooseAnonymoose ✭✭
    edited January 2015

    Look up the http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry to find the right way to name locales and language variants.

  • peregrineperegrine MVP
    edited January 2015

    @Anonymoose said:
    Look up the http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry to find the right way to name locales and language variants.

    perhaps,

    but it has nothing to do with solving the issue as far as the op (and may confuse the issue) . And I believe Todd has mentioned how they are adjusting locale names to make it easier for transifex to be used, so I am not sure if your link has much to do with vanilla as it stands now or how it will work in the future.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @m_maksim said:
    how should I give filename with translation for this plugin for russian language?
    i try ru_RU.php, vf_ru.php, RU.php
    but i doesn't work

    1. ru.php
    2. Make sure to save the ru.php as UTF-8 encoding without the BOM.
    3. Delete cache/locale_map.ini

    That sorted it out on my end. B)

  • kopnakopna Coimbra Portugal ☯

    @Bleistivt написал:
    It should be exactly the country code of your locale, which is also the name of the folder in the /locale directory.

    /plugins/Timeago/locale/vf_ru.php
    or
    /plugins/Timeago/locale/vf_ru_PETR1708.php

    should work, depending on which locale you are using.

    You may also need to clear the .ini files in your cache folder or diable/reenable the plugin for the new translation to take effect.

    В Notepad, сохраняешь файл с желаемым названием, например definitions но никак не definitions.php ! как предлагает сам Notepad. Нужно в опциях выбрать формат файла - php И сохранить в папке, дав ей название vf_ru а саму папку поместить в локаль плагина. Далее в файле site_core.php внести нужные изменения для руссифицированного плагина. Могу и ошибаться :-)

Sign In or Register to comment.