Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
651 views
in Q2A Core by
edited by
Hello, how can i rename the permalinks for:
/questions /users /unanswered and so on..
I have installed Q2A in a different language but the links are not translated.
Q2A version: latest
by
anyone ? i really want to change this !

1 Answer

+1 vote
by

Open your qa-config.php file, located in your root directory, uncomment and update these values to your preferences:

$QA_CONST_PATH_MAP = array(
'questions' => 'topics',
'categories' => 'sections',
'users' => 'contributors',
'user' => 'contributor',
);

by
+1
I stand corrected.
by
edited by
hello
i removed $ and renamed questions,categories,users,user then saved the file. did a clean history on browser and clear cache and .. nothing happens. did i miss something ?
i did miss something ..
as the file is .. should i remove */ ? what line ?
by
You should not remove the $ sign. You should paste the code as is, and the parts you should be replacing are the words:

'topics'
'sections'
'contributors'
'contributor'

It's also explained there, right above the line I linked on my answer:
https://github.com/q2a/question2answer/blob/bc1a8bc4fa951da908f14fc15aef65b01e8027a4/qa-config-example.php#L112
by
once i do that the page crashes with error 500
https://postimg.cc/1gbyNYL8
by
There's no ending parenthesis and semicolon ); in your code. And like I said, what you should be changing are the values in front of it, not the key..... So it should be:

$QA_CONST_PATH_MAP = array(
    'questions' => 'intrebari',
    'categories' => 'categorii',
    'users' => 'utilizatori',
    'user' => 'utilizator',
);
by
edited by
+1
hello
yeah.. my bad!
it works. how can i edit "ask" and "unanswered" ?

edit:
i figured out how
i just need to add new lines with links like this

$QA_CONST_PATH_MAP = array(
    'questions' => 'intrebari',
    'categories' => 'categorii',
    'users' => 'utilizatori',
    'user' => 'utilizator',
    'ask' => 'intreaba',
    'unanswered' => 'fara-raspuns',
...