Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

views $ comments & date not translating

jeongweejeongwee Vanilla version 2.6 ✭✭

image

image

image

how do i fix it....

Best Answers

  • Options
    peregrineperegrine MVP
    edited July 2013 Answer ✓

    try this just cut it and paste it in locale.php at the bottom. and see if it changes any thing.

    $Definition[ '%s view html'] = "help";
    $Definition[ '%s views html'] = "help me";

    I already edited my answer 5 comments back. :).

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

  • Options
    peregrineperegrine MVP
    Answer ✓

    '%s comment html',

    '%s comments html'

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

«13

Answers

  • Options
    hgtonighthgtonight ∞ · New MVP

    Definitions that have a variable in the must include the variable. It is traditionally %s.

    $Definition['%s comment'] = '%s single comment translation';
    $Definition['%s comments'] = '%s multiple comments translation';
    

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options
    jeongweejeongwee Vanilla version 2.6 ✭✭
    edited July 2013

    @hgtonight
    i added
    $Definition['%s views'] = '%s 浏览数';
    $Definition['%s comments'] = '%s 回复数';
    to locales/site_core.php still not translating....

  • Options
    peregrineperegrine MVP
    edited July 2013

    you can add it to or create conf/locale.php - this is the final locale configuration and overrides locale files in other directories.

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

  • Options
    jeongweejeongwee Vanilla version 2.6 ✭✭
    edited July 2013

    theres no locale.php under conf floder , i created a locale.php and added
    <?php $Definition['%s views'] = '%s 浏览数'; $Definition['%s comments'] = '%s 回复数'; ?>

    to the empty document.still not translating the views and comments to chinese words.

  • Options

    delete the .ini files in you cache folder always - after making css and locale changes if you want to see the correct results.

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

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    @peregrine I was wondering with definitions sometimes using "double quotes" instead of 'single' works but sometimes it bonks what gives?

  • Options
    jeongweejeongwee Vanilla version 2.6 ✭✭

    ....................deleted all .ini files and deleted locale.php under conf floder. then cr8 locale.php and added <?php $Definition['%s views'] = '%s 浏览数'; $Definition['%s comments'] = '%s 回复数'; ?> again ..........still not translating...........wats wrong with this .....btw my version is 2.1b1

  • Options
    jeongweejeongwee Vanilla version 2.6 ✭✭
    edited July 2013

    i also tryed add $Definition['%s views'] = '%s 浏览数'; $Definition['%s comments'] = '%s 回复数'; to vf_zh_CN/definitions.php and vf_zh_CN/site_core.php and delete ini files . also not translating.............anyone can help about this

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Just out of curiosity can you try and not close ?>

    <?php if (!defined('APPLICATION')) exit();
    
        $Definition['%s views'] = '%s 浏览数';
        $Definition['%s comments'] = '%s 回复数'; 
    
  • Options
    peregrineperegrine MVP
    edited July 2013

    @vrijvlinder
    syntax. obviously you have to escape single quotes inside single quotes and vice versa or use differing single vs double if the definition has a single or double inside it. Give an example of your situation. if you put a $variable inside a definition it has to be single quotes - counter intuitive.

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

  • Options
    jeongweejeongwee Vanilla version 2.6 ✭✭

    @vrijvlinder i tryed yours also not translating =_=

  • Options
    peregrineperegrine MVP
    edited July 2013

    it won't matter with "%s" or '%s' - double or single doesn't matter and I think you will be totally confusing the issue which is a cache issue most likely. Assuming the conf/locale.php is being read and there are no errors in it.

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

  • Options
    jeongweejeongwee Vanilla version 2.6 ✭✭

    @peregrine is it impossible to fixed?

  • Options

    if you do what I say it will.

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

  • Options
    peregrineperegrine MVP
    edited July 2013

    image that displayed it can be done was removed :).

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

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited July 2013

    Assuming the locale.php is being read

    Yea that is why peregrine said to put it in the conf folder. Try that again. This is just a replacement of words it is not really a translation so it is very straight forward . You put in the replacement words and they get replaced but the key is putting it in the correct folder so it gets read.

    Try again and put in the conf folder the locale.php

  • Options
    peregrineperegrine MVP
    edited July 2013

    post the contents of your cache/locale_map.ini

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

  • Options

    I'll let you take over V.

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

  • Options
    jeongweejeongwee Vanilla version 2.6 ✭✭
    edited July 2013

    im so noob maybe something i did wrong? see picture=_=

    1.jpg 51.6K
    2.jpg 25.9K
    3.jpg 45.3K
  • Options
    jeongweejeongwee Vanilla version 2.6 ✭✭

    contents of cache/locale_map.ini
    [zh-CN]
    0 = "E:\wamp\www/plugins/Floor/locale/zh-CN.php"
    1 = "E:\wamp\www/locales/vf_zh_CN/archive_core.php"
    2 = "E:\wamp\www/locales/vf_zh_CN/bad_defs.php"
    3 = "E:\wamp\www/locales/vf_zh_CN/dash_core.php"
    4 = "E:\wamp\www/locales/vf_zh_CN/definitions.php"
    5 = "E:\wamp\www/locales/vf_zh_CN/site_core.php"
    6 = "E:\wamp\www/conf/locale.php"

Sign In or Register to comment.