<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Question2Answer Q&amp;A - Recent questions tagged metadata</title>
<link>https://www.question2answer.org/qa/tag/metadata</link>
<description>Powered by Question2Answer</description>
<item>
<title>Disable plugin checkbox not enabled</title>
<link>https://www.question2answer.org/qa/63152/disable-plugin-checkbox-not-enabled</link>
<description>I've followed the description here &lt;a href=&quot;http://docs.question2answer.org/plugins/&quot; rel=&quot;nofollow&quot;&gt;http://docs.question2answer.org/plugins/&lt;/a&gt; to add a valid json file. It says that now I should be able to disable the plugin from the admin page. But the checkbox is still disabled.&lt;br /&gt;
Am I missing something?</description>
<category>Plugins</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/63152/disable-plugin-checkbox-not-enabled</guid>
<pubDate>Thu, 29 Mar 2018 11:24:08 +0000</pubDate>
</item>
<item>
<title>Urgent help on Metadata - performance issue</title>
<link>https://www.question2answer.org/qa/51419/urgent-help-on-metadata-performance-issue</link>
<description>Can someone please help me with this..&lt;br /&gt;
&lt;br /&gt;
I am facing a performance issue where occasionaly there is delay in loading the pages and i narrowed down the reason to be this. &lt;br /&gt;
&lt;br /&gt;
Line 39 - qa-include/Q2A/Util/Metadata.php&lt;br /&gt;
&lt;br /&gt;
$content = file_get_contents($metadataFile); &lt;br /&gt;
&lt;br /&gt;
This above function call seems to take forever and causing issues with response times. is there anyway i can bypass this code or make it faster . and what is the purpose of this code ?</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/51419/urgent-help-on-metadata-performance-issue</guid>
<pubDate>Mon, 18 Apr 2016 10:29:35 +0000</pubDate>
</item>
<item>
<title>Translating Q2A in v1.7+</title>
<link>https://www.question2answer.org/qa/40745/translating-q2a-in-v1-7</link>
<description>

&lt;div&gt;
	&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;span style=&quot;font-size:16px;&quot;&gt;&lt;strong&gt;Notes for developers only&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	As of 1.6.3, only translations for the language codes and countries listed in file &lt;a href=&quot;https://github.com/q2a/question2answer/blob/v1.6.3/qa-include/qa-app-admin.php#L69&quot; rel=&quot;nofollow&quot;&gt;https://github.com/q2a/question2answer/blob/v1.6.3/qa-include/qa-app-admin.php#L69&lt;/a&gt; were able to be added by just creating a directory named the same way as the ISO code listed in that file. For example, if I wanted to add the Spanish translation I just created the directory 'qa-lang/es' and then added the translation files in there.&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	However, this approach of having hardcoded ISO codes has 2 disadvantages:&lt;/div&gt;


&lt;ol&gt;
	

&lt;li&gt;
		It requires maintainance. In order to add a translation for a country with an ISO code not listed, it was needed to add that code in the 'qa-app-admin.php' file and then create the appropriate directory with the same name under 'qa-lang'&lt;/li&gt;
	

&lt;li&gt;
		It takes time. Newly added translations would have to wait for a new release in order to be in the core and be used without any core file modification&lt;/li&gt;
&lt;/ol&gt;


&lt;div&gt;
	As of 1.7 this has changed into a more dynamic approach. Instead of the core expecting a set of given ISO codes it will get the code from directories under 'qa-lang'. That means, if there is a directory named 'qa-lang/es-AR' (which is not supported in 1.6.3) then the core will assume 'es-AR' is the language code. That value will be saved in the 'site_language' option.&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	Although this would be enough to dynamically add new languages there is one minor thing missing: its display in the combobox of the site language setting. So in order to fix this a new file need to exist which will hold the display name. This file will be treated in a similar way to the new addon 'metadata.json' files. This means it will be a json file which will hold key-value elements. One of those elements (as of 1.7.0, the only one) will have the key 'name'. The value associated to that key will be the display name. In the 'es-AR' case it would be 'Spanish - Argentina'.&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	The advantage of doing so is that not only will it be possible to support any language code and country combination but also additional metadata could be added in the future. For example, it could be possible to add data for the author of the language file or maybe its version.&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;span style=&quot;font-size:16px;&quot;&gt;&lt;strong&gt;Notes for translators and developers&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	In order to create a translation for 1.7+ you should follow these steps:&lt;/div&gt;


&lt;ol&gt;
	

&lt;li&gt;
		Create a directory under 'qa-lang' named as the language code for your country and optionally with a country code. It is not actually required to use an ISO code but it will make things easier if the idea is to make the translation public. EG: 'qa-lang/es' or 'qa-lang/es-AR'.&lt;/li&gt;
	

&lt;li&gt;
		Copy all files from 'qa-include/lang' into the directory created in the previous step.&lt;/li&gt;
	

&lt;li&gt;
		Translate the files in the directory created in step 1.&lt;/li&gt;
	

&lt;li&gt;
		Create a the file 'metadata.json' under the directory created &amp;nbsp;in step 1. EG: 'qa-lang/es/metadata.json' or 'qa-lang/es-AR/metadata.json'.&lt;/li&gt;
	

&lt;li&gt;
		Add the following content to the file created in the previous step (of course, replace the language and country accordingly):&lt;/li&gt;
&lt;/ol&gt;


&lt;div&gt;
	&lt;span style=&quot;font-family: courier new, courier, monospace; color: #696969;&quot;&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#696969;&quot;&gt;&lt;span style=&quot;font-family:courier new,courier,monospace;&quot;&gt;&lt;strong&gt;&amp;nbsp; &amp;nbsp; &quot;name&quot;: &quot;Spanish - Argentina&quot;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#696969;&quot;&gt;&lt;span style=&quot;font-family:courier new,courier,monospace;&quot;&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	For a while, the 1.6.3 translation system will coexist with the 1.7 one but the former will eventually dissappear so it is a good idea to start new translations (or modify any current one) in a way that supports the new system.&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	You can check this GitHub repository for a real life example of a v1.7 compliant translation:&amp;nbsp;&lt;a href=&quot;https://github.com/pupi1985/q2a-spanish-translation&quot; rel=&quot;nofollow&quot;&gt;https://github.com/pupi1985/q2a-spanish-translation&lt;/a&gt;&lt;/div&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/40745/translating-q2a-in-v1-7</guid>
<pubDate>Tue, 04 Nov 2014 23:58:28 +0000</pubDate>
</item>
</channel>
</rss>